diff options
author | jkh <jkh@FreeBSD.org> | 1996-07-12 18:57:58 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-07-12 18:57:58 +0000 |
commit | c4d4a99d31762beef936f34571330923e9300da9 (patch) | |
tree | c116431af8e1f042b25e0f70c63c437cf7ff8d63 /lib/libc/stdlib/setenv.c | |
parent | 6657f01bfd009bbf4ec0481a17712259abf8ea77 (diff) | |
download | FreeBSD-src-c4d4a99d31762beef936f34571330923e9300da9.zip FreeBSD-src-c4d4a99d31762beef936f34571330923e9300da9.tar.gz |
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Diffstat (limited to 'lib/libc/stdlib/setenv.c')
-rw-r--r-- | lib/libc/stdlib/setenv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c index 4a28f25..d981277 100644 --- a/lib/libc/stdlib/setenv.c +++ b/lib/libc/stdlib/setenv.c @@ -46,6 +46,7 @@ char *__findenv __P((const char *, int *)); * Set the value of the environmental variable "name" to be * "value". If rewrite is set, replace any current value. */ +int setenv(name, value, rewrite) register const char *name; register const char *value; @@ -63,7 +64,7 @@ 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 */ @@ -93,7 +94,7 @@ setenv(name, value, rewrite) malloc((size_t)((int)(c - name) + l_value + 2)))) return (-1); for (c = environ[offset]; (*c = *name++) && *c != '='; ++c); - for (*c++ = '='; *c++ = *value++;); + for (*c++ = '='; (*c++ = *value++); ); return (0); } |