diff options
author | jraynard <jraynard@FreeBSD.org> | 1996-06-12 22:59:55 +0000 |
---|---|---|
committer | jraynard <jraynard@FreeBSD.org> | 1996-06-12 22:59:55 +0000 |
commit | e85e320a9e0511f35e7d9e062f18561014e59770 (patch) | |
tree | cfe4e5c175af1b86f8edd90380fb043a65690b52 /lib/libc/stdio/tempnam.c | |
parent | 4a395602dc927c2e081ae681cefecd87fe5ca3b1 (diff) | |
download | FreeBSD-src-e85e320a9e0511f35e7d9e062f18561014e59770.zip FreeBSD-src-e85e320a9e0511f35e7d9e062f18561014e59770.tar.gz |
Code cleanup:-
The usual stuff, adding missing function prototypes, argument types,
return values, etc.
This directory now compiles with no warnings with -Wall on gcc2.6.3!
Diffstat (limited to 'lib/libc/stdio/tempnam.c')
-rw-r--r-- | lib/libc/stdio/tempnam.c | 12 |
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; |