diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-03-10 08:12:09 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-03-10 08:12:09 +0000 |
commit | 93f96835f8c2126f3299568d66edfdc7664e555c (patch) | |
tree | 1a11628138dd8a8eeb007fcd1c43276a4d5c5404 | |
parent | 22f4d81f3e6712cb4fc07f33e902cc7382c2212b (diff) |
use size_t for string lengths
-rw-r--r-- | tests/server/getpart.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/server/getpart.c b/tests/server/getpart.c index cafdab0a8..59e39952c 100644 --- a/tests/server/getpart.c +++ b/tests/server/getpart.c @@ -39,14 +39,15 @@ static char *appendstring(char *string, /* original string */ char *buffer, /* to append */ - int *stringlen, int *stralloc) + size_t *stringlen, /* length of string */ + size_t *stralloc) /* allocated size */ { - int len = strlen(buffer); - int needed_len = len + *stringlen; + size_t len = strlen(buffer); + size_t needed_len = len + *stringlen; if(needed_len >= *stralloc) { char *newptr; - long newsize = needed_len*2; /* get twice the needed size */ + size_t newsize = needed_len*2; /* get twice the needed size */ newptr = realloc(string, newsize); if(newptr) { @@ -74,8 +75,8 @@ const char *spitout(FILE *stream, char display = 0; char *string; - int stringlen=0; - int stralloc=256; + size_t stringlen=0; + size_t stralloc=256; enum { STATE_OUTSIDE, |