diff options
author | 2001-07-09 06:57:42 +0000 | |
---|---|---|
committer | 2001-07-09 06:57:42 +0000 | |
commit | 20675415ae25d5cd6585b743a7a3b5fc8476438c (patch) | |
tree | b5c8b13f4ad70d8da1e9b7e09c544028ca4e34de /lib/libc/stdlib/setenv.c | |
parent | add i2o devices (diff) | |
download | wireguard-openbsd-20675415ae25d5cd6585b743a7a3b5fc8476438c.tar.xz wireguard-openbsd-20675415ae25d5cd6585b743a7a3b5fc8476438c.zip |
a first pass at -Wall
Diffstat (limited to 'lib/libc/stdlib/setenv.c')
-rw-r--r-- | lib/libc/stdlib/setenv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c index b6f261e61cf..fc7c67a5db6 100644 --- a/lib/libc/stdlib/setenv.c +++ b/lib/libc/stdlib/setenv.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setenv.c,v 1.3 1998/02/02 22:44:53 millert Exp $"; +static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -62,7 +62,8 @@ setenv(name, value, rewrite) if (!rewrite) return (0); if (strlen(C) >= l_value) { /* old larger; copy over */ - while (*C++ = *value++); + while ((*C++ = *value++)) + ; return (0); } } else { /* create new slot */ @@ -95,7 +96,7 @@ setenv(name, value, rewrite) return (-1); for (C = environ[offset]; (*C = *name++) && *C != '='; ++C) ; - for (*C++ = '='; *C++ = *value++; ) + for (*C++ = '='; (*C++ = *value++); ) ; return (0); } |