diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/stdlib/getenv.c | 11 | ||||
| -rw-r--r-- | src/lib/libc/stdlib/setenv.c | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libc/stdlib/getenv.c b/src/lib/libc/stdlib/getenv.c index 4db86df915..934f10928f 100644 --- a/src/lib/libc/stdlib/getenv.c +++ b/src/lib/libc/stdlib/getenv.c | |||
| @@ -32,12 +32,14 @@ | |||
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
| 35 | static char *rcsid = "$OpenBSD: getenv.c,v 1.4 1998/07/16 18:02:33 deraadt Exp $"; | 35 | static char *rcsid = "$OpenBSD: getenv.c,v 1.5 2002/12/10 22:44:12 mickey Exp $"; |
| 36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
| 37 | 37 | ||
| 38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
| 39 | #include <string.h> | 39 | #include <string.h> |
| 40 | 40 | ||
| 41 | char *__findenv(const char *name, int *offset); | ||
| 42 | |||
| 41 | /* | 43 | /* |
| 42 | * __findenv -- | 44 | * __findenv -- |
| 43 | * Returns pointer to value associated with name, if any, else NULL. | 45 | * 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 $ | |||
| 48 | * This routine *should* be a static; don't use it. | 50 | * This routine *should* be a static; don't use it. |
| 49 | */ | 51 | */ |
| 50 | char * | 52 | char * |
| 51 | __findenv(name, offset) | 53 | __findenv(const char *name, int *offset) |
| 52 | register const char *name; | ||
| 53 | int *offset; | ||
| 54 | { | 54 | { |
| 55 | extern char **environ; | 55 | extern char **environ; |
| 56 | register int len, i; | 56 | register int len, i; |
| @@ -83,7 +83,6 @@ getenv(name) | |||
| 83 | const char *name; | 83 | const char *name; |
| 84 | { | 84 | { |
| 85 | int offset; | 85 | int offset; |
| 86 | char *__findenv(); | ||
| 87 | 86 | ||
| 88 | return(__findenv(name, &offset)); | 87 | return (__findenv(name, &offset)); |
| 89 | } | 88 | } |
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c index fc7c67a5db..044f01b1c9 100644 --- a/src/lib/libc/stdlib/setenv.c +++ b/src/lib/libc/stdlib/setenv.c | |||
| @@ -32,12 +32,14 @@ | |||
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
| 35 | static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $"; | 35 | static char *rcsid = "$OpenBSD: setenv.c,v 1.5 2002/12/10 22:44:13 mickey Exp $"; |
| 36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
| 37 | 37 | ||
| 38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
| 39 | #include <string.h> | 39 | #include <string.h> |
| 40 | 40 | ||
| 41 | char *__findenv(const char *name, int *offset); | ||
| 42 | |||
| 41 | /* | 43 | /* |
| 42 | * setenv -- | 44 | * setenv -- |
| 43 | * Set the value of the environmental variable "name" to be | 45 | * Set the value of the environmental variable "name" to be |
| @@ -53,7 +55,6 @@ setenv(name, value, rewrite) | |||
| 53 | static int alloced; /* if allocated space before */ | 55 | static int alloced; /* if allocated space before */ |
| 54 | register char *C; | 56 | register char *C; |
| 55 | int l_value, offset; | 57 | int l_value, offset; |
| 56 | char *__findenv(); | ||
| 57 | 58 | ||
| 58 | if (*value == '=') /* no `=' in value */ | 59 | if (*value == '=') /* no `=' in value */ |
| 59 | ++value; | 60 | ++value; |
