From f387e59d52151943130670d7eb52e1e77201ae6f Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 13 Jun 2008 15:03:14 +1000 Subject: - (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent compiler warnings on some platforms. Based on a discussion with otto@ --- openbsd-compat/setenv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbsd-compat/setenv.c') 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; * 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) -- cgit v1.2.3