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.
-Peff