aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-10-11 11:20:19 +0100
committerRon Yorston <rmy@pobox.com>2012-10-11 11:20:19 +0100
commit0528a8658d7237f4bac0d853db51028036f6a650 (patch)
tree53c0d368482351d0a715806b5b168d464d2188ec
parent829a6d5a4db32610afa19077f6b9e52572385e66 (diff)
downloadbusybox-w32-0528a8658d7237f4bac0d853db51028036f6a650.tar.gz
busybox-w32-0528a8658d7237f4bac0d853db51028036f6a650.tar.bz2
busybox-w32-0528a8658d7237f4bac0d853db51028036f6a650.zip
mktemp: fix error detection in MINGW
-rw-r--r--debianutils/mktemp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c
index 983d7a246..7f60ca234 100644
--- a/debianutils/mktemp.c
+++ b/debianutils/mktemp.c
@@ -94,7 +94,11 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
94 94
95 if (opts & OPT_u) { 95 if (opts & OPT_u) {
96 chp = mktemp(chp); 96 chp = mktemp(chp);
97#if !ENABLE_PLATFORM_MINGW32
97 if (chp[0] == '\0') 98 if (chp[0] == '\0')
99#else
100 if (chp == NULL || chp[0] == '\0')
101#endif
98 goto error; 102 goto error;
99 } else if (opts & OPT_d) { 103 } else if (opts & OPT_d) {
100 if (mkdtemp(chp) == NULL) 104 if (mkdtemp(chp) == NULL)