Mercurial > hg > octave-nkf > gnulib-hg
changeset 3997:c1f0c85e44eb
(strdup): Tweak comment and initial #if/#include.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Thu, 21 Nov 2002 13:33:10 +0000 |
parents | 24e73e2fb249 |
children | 8e0b8a20e4bd |
files | lib/strdup.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/strdup.c +++ b/lib/strdup.c @@ -16,8 +16,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifdef HAVE_CONFIG_H -#include <config.h> +#if HAVE_CONFIG_H +# include <config.h> #endif #if defined _LIBC || defined STDC_HEADERS @@ -35,7 +35,9 @@ # define __strdup strdup #endif -/* Duplicate S, returning an identical malloc'd string. */ +/* Duplicate S, returning an identical malloc'd string. + Return NULL if out of memory. */ + char * __strdup (const char *s) {