summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/tempnam.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/tempnam.c')
-rw-r--r--lib/libc/stdio/tempnam.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c
index 6644ae5..0407e8bb1 100644
--- a/lib/libc/stdio/tempnam.c
+++ b/lib/libc/stdio/tempnam.c
@@ -55,28 +55,28 @@ tempnam(dir, pfx)
if (!pfx)
pfx = "tmp.";
- if (f = getenv("TMPDIR")) {
+ if ((f = getenv("TMPDIR"))) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
}
- if (f = (char *)dir) {
+ if ((f = (char *)dir)) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
}
f = P_tmpdir;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
f = _PATH_TMP;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
sverrno = errno;
OpenPOWER on IntegriCloud