diff -r 218904410231 -r f600b0d1fc5d gclib/strfuncs.c --- a/gclib/strfuncs.c Fri Jan 27 00:28:11 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -#include -#include -#include -#include - -/* - * Like strndup, but only returns NULL if str is NULL. - * Note that this routine copies n bytes rather than n characters. - */ -char *str_ndup(const char *str,size_t n) -{ - char *dup; - if (!str) - return NULL; - dup=mem_alloc0(n+1,1); - strncpy(dup,str,n); - return dup; -} - -/* - * Like strdup, but only returns NULL if str is NULL. - */ -char *str_dup(const char *str) -{ - return str_ndup(str,strlen(str)); -}