summaryrefslogtreecommitdiff
path: root/openbsd-compat/setenv.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-13 15:03:14 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-13 15:03:14 +1000
commitf387e59d52151943130670d7eb52e1e77201ae6f (patch)
treeadf581991a7c37facd5126477e3e5d8fc34f4060 /openbsd-compat/setenv.c
parent06db584e9de9d904a09300f09feed7f82026d241 (diff)
- (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent
compiler warnings on some platforms. Based on a discussion with otto@
Diffstat (limited to 'openbsd-compat/setenv.c')
-rw-r--r--openbsd-compat/setenv.c6
1 files changed, 3 insertions, 3 deletions
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)