From 20675415ae25d5cd6585b743a7a3b5fc8476438c Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 9 Jul 2001 06:57:42 +0000 Subject: a first pass at -Wall --- lib/libc/stdlib/setenv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/libc/stdlib/setenv.c') 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 @@ -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); } -- cgit v1.2.3-59-g8ed1b