summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-24 00:03:06 +0000
committerYang Tse <yangsita@gmail.com>2010-02-24 00:03:06 +0000
commit5695c4db861e3c3f200005ae428c89cd3ad6ccdb (patch)
tree5bdb249f29dffeec6784322ec111efcd8f80a609 /lib/ftp.c
parentaa0f8593b9b97948c509cbb475a9f184b9650e02 (diff)
downloadcurl-5695c4db861e3c3f200005ae428c89cd3ad6ccdb.tar.gz
fix compiler warning
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 87d5cafa3..85419009e 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -91,6 +91,7 @@
#include "url.h"
#include "rawstr.h"
#include "speedcheck.h"
+#include "warnless.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -759,9 +760,9 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
/* parse the port */
if( ip_end != NULL ) {
if((port_start = strchr(ip_end, ':')) != NULL) {
- port_min = (unsigned short)strtol(port_start+1, NULL, 10);
+ port_min = curlx_ultous(strtoul(port_start+1, NULL, 10));
if((port_sep = strchr(port_start, '-')) != NULL) {
- port_max = (unsigned short)strtol(port_sep + 1, NULL, 10);
+ port_max = curlx_ultous(strtoul(port_sep + 1, NULL, 10));
}
else
port_max = port_min;