diff options
author | 2002-12-10 22:44:12 +0000 | |
---|---|---|
committer | 2002-12-10 22:44:12 +0000 | |
commit | 0bf9f082d9ed6911e86435fb758218d1e0b36a73 (patch) | |
tree | 7c60d3f690dd84e98c3f3b4a05d9b1a5883dfb30 /lib/libc | |
parent | Document BSD behavior of accepting '-' within optstring as long as (diff) | |
download | wireguard-openbsd-0bf9f082d9ed6911e86435fb758218d1e0b36a73.tar.xz wireguard-openbsd-0bf9f082d9ed6911e86435fb758218d1e0b36a73.zip |
use proper __findenv() prototype; millert@ ok
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/getenv.c | 11 | ||||
-rw-r--r-- | lib/libc/stdlib/setenv.c | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c index 4db86df915f..934f10928f6 100644 --- a/lib/libc/stdlib/getenv.c +++ b/lib/libc/stdlib/getenv.c @@ -32,12 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: getenv.c,v 1.4 1998/07/16 18:02:33 deraadt Exp $"; +static char *rcsid = "$OpenBSD: getenv.c,v 1.5 2002/12/10 22:44:12 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> #include <string.h> +char *__findenv(const char *name, int *offset); + /* * __findenv -- * Returns pointer to value associated with name, if any, else NULL. @@ -48,9 +50,7 @@ static char *rcsid = "$OpenBSD: getenv.c,v 1.4 1998/07/16 18:02:33 deraadt Exp $ * This routine *should* be a static; don't use it. */ char * -__findenv(name, offset) - register const char *name; - int *offset; +__findenv(const char *name, int *offset) { extern char **environ; register int len, i; @@ -83,7 +83,6 @@ getenv(name) const char *name; { int offset; - char *__findenv(); - return(__findenv(name, &offset)); + return (__findenv(name, &offset)); } diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c index fc7c67a5db6..044f01b1c92 100644 --- a/lib/libc/stdlib/setenv.c +++ b/lib/libc/stdlib/setenv.c @@ -32,12 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $"; +static char *rcsid = "$OpenBSD: setenv.c,v 1.5 2002/12/10 22:44:13 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> #include <string.h> +char *__findenv(const char *name, int *offset); + /* * setenv -- * Set the value of the environmental variable "name" to be @@ -53,7 +55,6 @@ setenv(name, value, rewrite) static int alloced; /* if allocated space before */ register char *C; int l_value, offset; - char *__findenv(); if (*value == '=') /* no `=' in value */ ++value; |