[BusyBox] strdup versus xstrdup
Erik Andersen
andersen at codepoet.org
Sat Nov 10 00:42:25 UTC 2001
On Sat Nov 10, 2001 at 06:39:32PM +1100, Steve Merrifield wrote:
> Hi,
>
> What is the feeling towards the use of strdup() versus xstrdup() ?
>
> Some applets use one, some use the other. Some use both! I note
> one of the janitorial tasks is to replace the use of strdup() with
> xstrdup().
>
> Is there a need for this? Is anyone working on it? Would anyone
> mind if I went through the entire tree and replaced all occurences
> of strdup() with xstrdup() ?
That would be excellent. Just be careful to also remove
any code checking the result of a strdup for NULL, and
check for any code that should fail gracefully on failure,
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list