summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/tempnam.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-07-09 06:57:42 +0000
committerderaadt <deraadt@openbsd.org>2001-07-09 06:57:42 +0000
commit20675415ae25d5cd6585b743a7a3b5fc8476438c (patch)
treeb5c8b13f4ad70d8da1e9b7e09c544028ca4e34de /lib/libc/stdio/tempnam.c
parentadd i2o devices (diff)
downloadwireguard-openbsd-20675415ae25d5cd6585b743a7a3b5fc8476438c.tar.xz
wireguard-openbsd-20675415ae25d5cd6585b743a7a3b5fc8476438c.zip
a first pass at -Wall
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 7c5f95e642d..80af80f790b 100644
--- a/lib/libc/stdio/tempnam.c
+++ b/lib/libc/stdio/tempnam.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: tempnam.c,v 1.9 1997/04/03 05:31:37 millert Exp $";
+static char rcsid[] = "$OpenBSD: tempnam.c,v 1.10 2001/07/09 06:57:44 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -64,25 +64,25 @@ tempnam(dir, pfx)
if (issetugid() == 0 && (f = getenv("TMPDIR"))) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXXXXXX", 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%sXXXXXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if (f = _mktemp(name))
+ if ((f = _mktemp(name)))
return(f);
}
f = P_tmpdir;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXXXX", f, pfx);
- if (f = _mktemp(name))
+ if ((f = _mktemp(name)))
return(f);
f = _PATH_TMP;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXXXX", f, pfx);
- if (f = _mktemp(name))
+ if ((f = _mktemp(name)))
return(f);
sverrno = errno;