diff options
| author | pat <> | 2005-03-30 18:51:49 +0000 |
|---|---|---|
| committer | pat <> | 2005-03-30 18:51:49 +0000 |
| commit | 894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (patch) | |
| tree | f9fb8e9324f6cbdc10d72cab8b889d470252465a /src/lib/libc/stdlib/getenv.c | |
| parent | 162f8b042bf31ab94714a6f194e9836c08c085f5 (diff) | |
| download | openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.gz openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.bz2 openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.zip | |
ansi + de-register
ok otto deraadt
Diffstat (limited to 'src/lib/libc/stdlib/getenv.c')
| -rw-r--r-- | src/lib/libc/stdlib/getenv.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libc/stdlib/getenv.c b/src/lib/libc/stdlib/getenv.c index c597e468a9..7e4d6b91a9 100644 --- a/src/lib/libc/stdlib/getenv.c +++ b/src/lib/libc/stdlib/getenv.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #if defined(LIBC_SCCS) && !defined(lint) | 30 | #if defined(LIBC_SCCS) && !defined(lint) |
| 31 | static char *rcsid = "$OpenBSD: getenv.c,v 1.6 2003/06/02 20:18:37 millert Exp $"; | 31 | static char *rcsid = "$OpenBSD: getenv.c,v 1.7 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> |
| @@ -49,9 +49,9 @@ char * | |||
| 49 | __findenv(const char *name, int *offset) | 49 | __findenv(const char *name, int *offset) |
| 50 | { | 50 | { |
| 51 | extern char **environ; | 51 | extern char **environ; |
| 52 | register int len, i; | 52 | int len, i; |
| 53 | register const char *np; | 53 | const char *np; |
| 54 | register char **p, *cp; | 54 | char **p, *cp; |
| 55 | 55 | ||
| 56 | if (name == NULL || environ == NULL) | 56 | if (name == NULL || environ == NULL) |
| 57 | return (NULL); | 57 | return (NULL); |
| @@ -75,8 +75,7 @@ __findenv(const char *name, int *offset) | |||
| 75 | * Returns ptr to value associated with name, if any, else NULL. | 75 | * Returns ptr to value associated with name, if any, else NULL. |
| 76 | */ | 76 | */ |
| 77 | char * | 77 | char * |
| 78 | getenv(name) | 78 | getenv(const char *name) |
| 79 | const char *name; | ||
| 80 | { | 79 | { |
| 81 | int offset; | 80 | int offset; |
| 82 | 81 | ||
