Re: [RFC 2/2] Git-over-TLS (gits://) client side support (part 2 of 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 13, 2010 at 14:19, Ilari Liusvaara
<ilari.liusvaara@xxxxxxxxxxx> wrote:
> +char *copy_alloc(const char *str, size_t len)
> +{
> +       char *copy;
> +
> +       copy = xmalloc(len + 1);
> +       copy[len] = 0;
> +       strncpy(copy, str, len);
> +       return copy;
> +}

Some know this code as strndup(3):

  http://linux.die.net/man/3/strndup
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]