summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/setenv.c
diff options
context:
space:
mode:
authorpat <>2005-03-30 18:51:49 +0000
committerpat <>2005-03-30 18:51:49 +0000
commit894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (patch)
treef9fb8e9324f6cbdc10d72cab8b889d470252465a /src/lib/libc/stdlib/setenv.c
parent162f8b042bf31ab94714a6f194e9836c08c085f5 (diff)
downloadopenbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.gz
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.bz2
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.zip
ansi + de-register
ok otto deraadt
Diffstat (limited to 'src/lib/libc/stdlib/setenv.c')
-rw-r--r--src/lib/libc/stdlib/setenv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c
index 40305dbe1c..ce0d3f9699 100644
--- a/src/lib/libc/stdlib/setenv.c
+++ b/src/lib/libc/stdlib/setenv.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
31static char *rcsid = "$OpenBSD: setenv.c,v 1.7 2005/02/16 21:20:22 millert Exp $"; 31static char *rcsid = "$OpenBSD: setenv.c,v 1.8 2005/03/30 18:51:49 pat Exp $";
32#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
33 33
34#include <stdlib.h> 34#include <stdlib.h>
@@ -44,10 +44,7 @@ extern char **environ;
44 * "value". If rewrite is set, replace any current value. 44 * "value". If rewrite is set, replace any current value.
45 */ 45 */
46int 46int
47setenv(name, value, rewrite) 47setenv(const char *name, const char *value, int rewrite)
48 const char *name;
49 const char *value;
50 int rewrite;
51{ 48{
52 static char **lastenv; /* last value of environ */ 49 static char **lastenv; /* last value of environ */
53 char *C; 50 char *C;
@@ -97,8 +94,7 @@ setenv(name, value, rewrite)
97 * Delete environmental variable "name". 94 * Delete environmental variable "name".
98 */ 95 */
99void 96void
100unsetenv(name) 97unsetenv(const char *name)
101 const char *name;
102{ 98{
103 char **P; 99 char **P;
104 int offset; 100 int offset;