diff options
| author | James Raynard <jraynard@FreeBSD.org> | 1996-06-12 22:59:55 +0000 | 
|---|---|---|
| committer | James Raynard <jraynard@FreeBSD.org> | 1996-06-12 22:59:55 +0000 | 
| commit | 45f6af02524004681276825c75dc734695d119ac (patch) | |
| tree | cfe4e5c175af1b86f8edd90380fb043a65690b52 /lib/libc/stdio/tempnam.c | |
| parent | b83100194d4f0c9572abe0fead120220437216f0 (diff) | |
Notes
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 6644ae5020a7..0407e8bb166c 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; | 
