Re: [PATCH 1/5] Make xstrndup common

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

 



Hi,

On Mon, 30 Apr 2007, Jeff King wrote:

> On Mon, Apr 30, 2007 at 03:12:50PM +0200, Johannes Schindelin wrote:
> 
> > Unless I am missing something, I think this should work:
> > 
> > static inline char *xstrndup(const char *str, int len)
> > {
> > 	char *result = strndup(str, len);
> > 	if (result == NULL)
> > 		die ("xstrndup(): out of memory");
> > 	return result;
> > }
> > 
> > Hmm?
> 
> I can't speak for the original authors, but I imagine part of the
> impetus was that strndup is a GNU-ism.

D'oh! I never thought this was a GNU-ism.

Ciao,
Dscho

-
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]