summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/mkdtemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/mkdtemp.c')
-rw-r--r--libc/stdlib/mkdtemp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/stdlib/mkdtemp.c b/libc/stdlib/mkdtemp.c
index 20a2e16bc..6773a5bb3 100644
--- a/libc/stdlib/mkdtemp.c
+++ b/libc/stdlib/mkdtemp.c
@@ -30,9 +30,8 @@
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';
-
+ return NULL;
+ else
return template;
}
#endif