diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-29 13:56:45 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-29 13:56:45 +0000 |
commit | 4d17d6876e4b2f08380812c4ec113073b0a14639 (patch) | |
tree | 7283f07518be4c7250d72ac89c38729563ffa642 /lib/escape.c | |
parent | 0d6236f7e10468f75d09796ba9640c9054ab1f04 (diff) | |
download | curl-4d17d6876e4b2f08380812c4ec113073b0a14639.tar.gz |
Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
Diffstat (limited to 'lib/escape.c')
-rw-r--r-- | lib/escape.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/escape.c b/lib/escape.c index 2ecec11b0..87a9f1b9e 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -44,7 +44,7 @@ char *curl_escape(const char *string, int length) char *testing_ptr = NULL; unsigned char in; int newlen = alloc; - int index=0; + int strindex=0; length = alloc-1; while(length--) { @@ -65,17 +65,17 @@ char *curl_escape(const char *string, int length) ns = testing_ptr; } } - sprintf(&ns[index], "%%%02X", in); + sprintf(&ns[strindex], "%%%02X", in); - index+=3; + strindex+=3; } else { /* just copy this */ - ns[index++]=in; + ns[strindex++]=in; } string++; } - ns[index]=0; /* terminate it */ + ns[strindex]=0; /* terminate it */ return ns; } @@ -88,7 +88,7 @@ char *curl_unescape(const char *string, int length) int alloc = (length?length:(int)strlen(string))+1; char *ns = malloc(alloc); unsigned char in; - int index=0; + int strindex=0; unsigned int hex; if( !ns ) { @@ -112,10 +112,10 @@ char *curl_unescape(const char *string, int length) alloc-=2; } - ns[index++] = in; + ns[strindex++] = in; string++; } - ns[index]=0; /* terminate it */ + ns[strindex]=0; /* terminate it */ return ns; } |