[PATCH] fix mkdtemp() return '\0' instead of 'NULL' when it fails

Bryan Wu cooloney.lkml at gmail.com
Wed Jan 24 00:24:22 PST 2007


Hi folks:

When I do some LTP test on blackfin-uclinux platform with uClibc
support, I found the implemenation of function mkdtemp() conflict with
the manpages.

This is a normal test function call as below:
====================
if (mkdtemp(template) = NULL)
        printf("%s: mkdtemp(%s) failed; errno template, errno, strerror(errno));
====================

But I found the mkdtemp() of uClibc will never return NULL when it fails.
So I post this patch attached to fix this bug, IMO.

Thanks
-Bryan Wu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkdtemp.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
Url : http://busybox.net/lists/uclibc/attachments/20070124/6e9057cd/attachment.bin 


More information about the uClibc mailing list