svn commit: trunk/uClibc/libc/stdlib
vapier at uclibc.org
vapier at uclibc.org
Wed Jan 24 10:09:42 UTC 2007
Author: vapier
Date: 2007-01-24 02:09:41 -0800 (Wed, 24 Jan 2007)
New Revision: 17494
Log:
fix from Bryan Wu: return NULL upon error, not the NULL string
Modified:
trunk/uClibc/libc/stdlib/mkdtemp.c
Changeset:
Modified: trunk/uClibc/libc/stdlib/mkdtemp.c
===================================================================
--- trunk/uClibc/libc/stdlib/mkdtemp.c 2007-01-24 09:32:42 UTC (rev 17493)
+++ trunk/uClibc/libc/stdlib/mkdtemp.c 2007-01-24 10:09:41 UTC (rev 17494)
@@ -29,10 +29,9 @@
(This function comes from OpenBSD.) */
char * mkdtemp (char *template)
{
- if (__gen_tempname (template, __GT_DIR))
- /* We return the null string if we can't find a unique file name. */
- template[0] = '\0';
-
+ if (__gen_tempname (template, __GT_DIR))
+ return NULL;
+ else
return template;
}
#endif
More information about the uClibc-cvs
mailing list