summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 1360fde0cc..0d4511ad5d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7483,8 +7483,11 @@ vim_tempname(extra_char)
# else /* WIN3264 */
# ifdef USE_TMPNAM
+ char_u *p;
+
/* tmpnam() will make its own name */
- if (*tmpnam((char *)itmp) == NUL)
+ p = tmpnam((char *)itmp);
+ if (p == NULL || *p == NUL)
return NULL;
# else
char_u *p;