diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-19 09:34:28 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-19 09:34:28 -0500 |
commit | 2e6239dd064d201c6e1b0f589bae9ff27949d2eb (patch) | |
tree | 2d931387a4a091e69cecabd196c23dec94bef3ad /src | |
parent | 095a5ae6f2466cdd457cdf3e9925b1fbd302c9be (diff) | |
download | musl-2e6239dd064d201c6e1b0f589bae9ff27949d2eb.tar.gz musl-2e6239dd064d201c6e1b0f589bae9ff27949d2eb.tar.bz2 musl-2e6239dd064d201c6e1b0f589bae9ff27949d2eb.tar.xz musl-2e6239dd064d201c6e1b0f589bae9ff27949d2eb.zip |
fix major bug created from copying mkdtemp logic
Diffstat (limited to 'src')
-rw-r--r-- | src/temp/mkstemp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/temp/mkstemp.c b/src/temp/mkstemp.c index 2ab3020b..20019ed9 100644 --- a/src/temp/mkstemp.c +++ b/src/temp/mkstemp.c @@ -13,7 +13,7 @@ int mkstemp(char *template) { int fd, retries = 100; while (retries--) { - if (!__mktemp(template)) return 0; + if (!__mktemp(template)) return -1; if ((fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600))>=0) return fd; if (errno != EEXIST) return -1; |