From 93f96835f8c2126f3299568d66edfdc7664e555c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 10 Mar 2004 08:12:09 +0000 Subject: use size_t for string lengths --- tests/server/getpart.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/server') 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, -- cgit v1.2.3