aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2007-01-28 05:33:37 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2007-01-28 05:33:37 +0000
commit519718fb8555fa989122238ba4514e508cb1da8a (patch)
treec891587d66a5b789d63836a1db0d5295fcae40e6
parent53e81590562fb7e180c070522a6f63b38f1344bc (diff)
downloaduClibc-519718fb8555fa989122238ba4514e508cb1da8a.tar.gz
uClibc-519718fb8555fa989122238ba4514e508cb1da8a.tar.bz2
pull mkdtemp fix from trunk
-rw-r--r--libc/stdlib/mkdtemp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/stdlib/mkdtemp.c b/libc/stdlib/mkdtemp.c
index e1ece812f..42a77a8bc 100644
--- a/libc/stdlib/mkdtemp.c
+++ b/libc/stdlib/mkdtemp.c
@@ -28,9 +28,8 @@
(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;
}