summaryrefslogtreecommitdiff
path: root/src/temp/mktemp.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-12 10:25:29 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-12 10:25:29 -0400
commit382584724308442f03f3d29f7fc6de9e9d140982 (patch)
tree980abc8f3dd8a06ec34a5d95972acf3c3c5d7e1d /src/temp/mktemp.c
parent2697b4e755f0ca3f0c660894eb6e906a046789bb (diff)
downloadmusl-382584724308442f03f3d29f7fc6de9e9d140982.tar.gz
another return value fix for mktemp...
Diffstat (limited to 'src/temp/mktemp.c')
-rw-r--r--src/temp/mktemp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/temp/mktemp.c b/src/temp/mktemp.c
index 1057651e..654a2794 100644
--- a/src/temp/mktemp.c
+++ b/src/temp/mktemp.c
@@ -17,7 +17,8 @@ char *__mktemp(char *template)
if (l < 6 || strcmp(template+l-6, "XXXXXX")) {
errno = EINVAL;
- return 0;
+ *template = 0;
+ return template;
}
clock_gettime(CLOCK_REALTIME, &ts);
r = ts.tv_nsec + (uintptr_t)&ts / 16 + (uintptr_t)template;