diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-11-10 10:10:10 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-11-10 10:10:10 +1100 |
commit | b8c89d14bbd6ea20e1ef785adcfd27d067009f3d (patch) | |
tree | ae5989e1dac23283f78a558912ae94cbca4ec600 /openbsd-compat | |
parent | 9b59ada7ca95a7ab42c49ae7b7cd6ff713b1bea0 (diff) |
- (dtucker) [openbsd-compat/getenv.c] Merge changes for __findenv from
OpenBSD getenv.c revs 1.4 - 1.8 (ANSIfication of arguments, removal of
"register").
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/setenv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c index c3a86c651..9f746ded0 100644 --- a/openbsd-compat/setenv.c +++ b/openbsd-compat/setenv.c | |||
@@ -41,6 +41,8 @@ static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $ | |||
41 | 41 | ||
42 | char *__findenv(const char *name, int *offset); | 42 | char *__findenv(const char *name, int *offset); |
43 | 43 | ||
44 | /* OpenSSH Portable: __findenv is from getenv.c rev 1.8 */ | ||
45 | |||
44 | /* | 46 | /* |
45 | * __findenv -- | 47 | * __findenv -- |
46 | * Returns pointer to value associated with name, if any, else NULL. | 48 | * Returns pointer to value associated with name, if any, else NULL. |
@@ -51,14 +53,12 @@ char *__findenv(const char *name, int *offset); | |||
51 | * This routine *should* be a static; don't use it. | 53 | * This routine *should* be a static; don't use it. |
52 | */ | 54 | */ |
53 | char * | 55 | char * |
54 | __findenv(name, offset) | 56 | __findenv(const char *name, int *offset) |
55 | register const char *name; | ||
56 | int *offset; | ||
57 | { | 57 | { |
58 | extern char **environ; | 58 | extern char **environ; |
59 | register int len, i; | 59 | int len, i; |
60 | register const char *np; | 60 | const char *np; |
61 | register char **p, *cp; | 61 | char **p, *cp; |
62 | 62 | ||
63 | if (name == NULL || environ == NULL) | 63 | if (name == NULL || environ == NULL) |
64 | return (NULL); | 64 | return (NULL); |