From d6777fe3f7a5f43d7175515b38e61ee6e4a26731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 16 Jun 2005 16:27:35 +0000 Subject: [PATCH] rename index to idx to avoid shadowing git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15408 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/environment.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/roken/environment.c b/lib/roken/environment.c index 2b5398807..6e7fa28dd 100644 --- a/lib/roken/environment.c +++ b/lib/roken/environment.c @@ -65,7 +65,7 @@ find_var(char **env, char *assignment, size_t len) static int rk_read_env_file(FILE *F, char ***env, int *assigned) { - int index = 0; + int idx = 0; int i; char **l; char buf[BUFSIZ], *p, *r; @@ -74,7 +74,7 @@ rk_read_env_file(FILE *F, char ***env, int *assigned) *assigned = 0; - for(index = 0; *env != NULL && (*env)[index] != NULL; index++); + for(idx = 0; *env != NULL && (*env)[idx] != NULL; idx++); l = *env; /* This is somewhat more relaxed on what it accepts then @@ -104,19 +104,19 @@ rk_read_env_file(FILE *F, char ***env, int *assigned) continue; } - tmp = realloc(l, (index+2) * sizeof (char *)); + tmp = realloc(l, (idx+2) * sizeof (char *)); if(tmp == NULL) { ret = ENOMEM; break; } l = tmp; - l[index] = strdup(p); - if(l[index] == NULL) { + l[idx] = strdup(p); + if(l[idx] == NULL) { ret = ENOMEM; break; } - l[++index] = NULL; + l[++idx] = NULL; (*assigned)++; } if(ferror(F))