diff options
Diffstat (limited to 'src/testcurl/test_basicauth.c')
-rw-r--r-- | src/testcurl/test_basicauth.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testcurl/test_basicauth.c b/src/testcurl/test_basicauth.c index f9ce2455..333ccfee 100644 --- a/src/testcurl/test_basicauth.c +++ b/src/testcurl/test_basicauth.c | |||
@@ -426,7 +426,7 @@ ahc_echo (void *cls, | |||
426 | 426 | ||
427 | 427 | ||
428 | static CURL * | 428 | static CURL * |
429 | setupCURL (void *cbc, int port, char *errbuf) | 429 | setupCURL (void *cbc, uint16_t port, char *errbuf) |
430 | { | 430 | { |
431 | CURL *c; | 431 | CURL *c; |
432 | char url[512]; | 432 | char url[512]; |
@@ -437,7 +437,8 @@ setupCURL (void *cbc, int port, char *errbuf) | |||
437 | /* A workaround for some old libcurl versions, which ignore the specified | 437 | /* A workaround for some old libcurl versions, which ignore the specified |
438 | * port by CURLOPT_PORT when authorisation is used. */ | 438 | * port by CURLOPT_PORT when authorisation is used. */ |
439 | res = snprintf (url, (sizeof(url) / sizeof(url[0])), | 439 | res = snprintf (url, (sizeof(url) / sizeof(url[0])), |
440 | "http://127.0.0.1:%d%s", port, MHD_URI_BASE_PATH); | 440 | "http://127.0.0.1:%u%s", (unsigned int) port, |
441 | MHD_URI_BASE_PATH); | ||
441 | if ((0 >= res) || ((sizeof(url) / sizeof(url[0])) <= (size_t) res)) | 442 | if ((0 >= res) || ((sizeof(url) / sizeof(url[0])) <= (size_t) res)) |
442 | externalErrorExitDesc ("Cannot form request URL"); | 443 | externalErrorExitDesc ("Cannot form request URL"); |
443 | } | 444 | } |