summaryrefslogtreecommitdiffstats
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 2b1f01ba..c2818ecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -171,6 +171,8 @@
- (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
on big endian machines, so ifdef them for little-endian only to prevent
unused function warnings on big-endians.
+ - (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent
+ compiler warnings on some platforms. Based on a discussion with otto@
20080611
- (djm) [channels.c configure.ac]
@@ -4333,4 +4335,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.5002 2008/06/13 04:51:28 dtucker Exp $
+$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 b52a99c2..e2a8b6dd 100644
--- a/openbsd-compat/setenv.c
+++ b/openbsd-compat/setenv.c
@@ -47,7 +47,7 @@ extern char **environ;
* Explicitly removes '=' in argument name.
*/
static char *
-__findenv(const char *name, int *offset)
+__findenv(const char *name, size_t *offset)
{
extern char **environ;
int len, i;
@@ -82,7 +82,7 @@ setenv(const char *name, const char *value, int rewrite)
{
static char **lastenv; /* last value of environ */
char *C;
- int l_value, offset;
+ size_t l_value, offset;
if (*value == '=') /* no `=' in value */
++value;
@@ -133,7 +133,7 @@ void
unsetenv(const char *name)
{
char **P;
- int offset;
+ size_t offset;
while (__findenv(name, &offset)) /* if set multiple times */
for (P = &environ[offset];; ++P)