summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--openbsd-compat/setenv.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b1f01ba9..c2818ecfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -171,6 +171,8 @@
171 - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used 171 - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
172 on big endian machines, so ifdef them for little-endian only to prevent 172 on big endian machines, so ifdef them for little-endian only to prevent
173 unused function warnings on big-endians. 173 unused function warnings on big-endians.
174 - (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent
175 compiler warnings on some platforms. Based on a discussion with otto@
174 176
17520080611 17720080611
176 - (djm) [channels.c configure.ac] 178 - (djm) [channels.c configure.ac]
@@ -4333,4 +4335,4 @@
4333 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4335 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4334 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4336 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4335 4337
4336$Id: ChangeLog,v 1.5002 2008/06/13 04:51:28 dtucker Exp $ 4338$Id: ChangeLog,v 1.5003 2008/06/13 05:03:14 dtucker Exp $
diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c
index b52a99c2c..e2a8b6dd3 100644
--- a/openbsd-compat/setenv.c
+++ b/openbsd-compat/setenv.c
@@ -47,7 +47,7 @@ extern char **environ;
47 * Explicitly removes '=' in argument name. 47 * Explicitly removes '=' in argument name.
48 */ 48 */
49static char * 49static char *
50__findenv(const char *name, int *offset) 50__findenv(const char *name, size_t *offset)
51{ 51{
52 extern char **environ; 52 extern char **environ;
53 int len, i; 53 int len, i;
@@ -82,7 +82,7 @@ setenv(const char *name, const char *value, int rewrite)
82{ 82{
83 static char **lastenv; /* last value of environ */ 83 static char **lastenv; /* last value of environ */
84 char *C; 84 char *C;
85 int l_value, offset; 85 size_t l_value, offset;
86 86
87 if (*value == '=') /* no `=' in value */ 87 if (*value == '=') /* no `=' in value */
88 ++value; 88 ++value;
@@ -133,7 +133,7 @@ void
133unsetenv(const char *name) 133unsetenv(const char *name)
134{ 134{
135 char **P; 135 char **P;
136 int offset; 136 size_t offset;
137 137
138 while (__findenv(name, &offset)) /* if set multiple times */ 138 while (__findenv(name, &offset)) /* if set multiple times */
139 for (P = &environ[offset];; ++P) 139 for (P = &environ[offset];; ++P)