[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] xstrdup.c
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] xstrdup.c |
Date: |
Sun, 22 Feb 2004 15:01:18 +0100 |
User-agent: |
KMail/1.5 |
Derek Robert Price wrote:
> Would anyone have any objections to xstrdup(NULL) returning NULL?
Yes. For the developer it's easier to remember if the 'x' stands for just
one thing: checking the memory allocation failures. xmalloc, xstrdup,
xgethostname, xgetcwd, xsetenv, etc. have this in common.
strdup(NULL) is an error, therefore xstrdup(NULL) should continue to be
banned as well.
Bruno