aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-26 16:42:33 +0000
committerYang Tse <yangsita@gmail.com>2010-02-26 16:42:33 +0000
commitbcd1c7c2e92d41ab02163a36a1ab9d5a7afd83a9 (patch)
tree0b98ca5c331ee57703a51747d0f8e975ceaffab7 /tests/server
parent87428e07ca17a99fb2409ec39213b7badbe967ea (diff)
fix compiler warning
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/getpart.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index 3ecc20c99..6f893a8bc 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -27,8 +27,10 @@
#include "getpart.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+ versions instead */
+#include "curlx.h" /* from the private lib dir */
/* just to please base64.h we create a fake struct */
struct SessionHandle {
@@ -97,7 +99,9 @@ static int readline(char **buffer, size_t *bufsize, FILE *stream)
}
for(;;) {
- if(!fgets(*buffer + offset, (int)(*bufsize - offset), stream))
+ int bytestoread = curlx_uztosi(*bufsize - offset);
+
+ if(!fgets(*buffer + offset, bytestoread, stream))
return (offset != 0) ? GPE_OK : GPE_END_OF_FILE ;
length = offset + strlen(*buffer + offset);