summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-07-05 00:11:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-07-05 10:18:48 +0200
commit1b3d59acf9ad83077b29074000dd1a3ada0ecb61 (patch)
tree9266e8578730b2cc569112f0a4ab50b2b9c0595c /lib/setopt.c
parentdcb7d4f904b72e662edd33e869713f6d2c4b5fc2 (diff)
downloadcurl-1b3d59acf9ad83077b29074000dd1a3ada0ecb61.tar.gz
urldata: reduce size of four ftp related members
ftp_filemethod, ftpsslauth and ftp_ccc are now uchars accepttimeout is now unsigned int - almost 50 days ought to be enough for this value. Closes #9106
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index 1bb44bd91..d5e3b50c8 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -1481,10 +1481,10 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
/*
* The maximum time for curl to wait for FTP server connect
*/
- arg = va_arg(param, long);
- if(arg < 0)
- return CURLE_BAD_FUNCTION_ARGUMENT;
- data->set.accepttimeout = arg;
+ uarg = va_arg(param, unsigned long);
+ if(uarg >= UINT_MAX)
+ uarg = UINT_MAX;
+ data->set.accepttimeout = (unsigned int)uarg;
break;
#endif