mirror of
https://github.com/curl/curl.git
synced 2026-08-05 04:36:14 +03:00
tool_paramhlp: make the max argument a 'double'
To fix compiler warnings "Implicit conversion from 'long' to 'double' may lose precision" Closes #9700
This commit is contained in:
parent
1de60b18de
commit
703efb3379
3 changed files with 7 additions and 6 deletions
|
|
@ -808,7 +808,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
break;
|
||||
case 'c': /* connect-timeout */
|
||||
err = str2udouble(&config->connecttimeout, nextarg,
|
||||
LONG_MAX/1000);
|
||||
(double)LONG_MAX/1000);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
|
|
@ -1374,7 +1374,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
return err;
|
||||
break;
|
||||
case 'R': /* --expect100-timeout */
|
||||
err = str2udouble(&config->expect100timeout, nextarg, LONG_MAX/1000);
|
||||
err = str2udouble(&config->expect100timeout, nextarg,
|
||||
(double)LONG_MAX/1000);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
|
|
@ -2067,7 +2068,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
break;
|
||||
case 'm':
|
||||
/* specified max time */
|
||||
err = str2udouble(&config->timeout, nextarg, LONG_MAX/1000);
|
||||
err = str2udouble(&config->timeout, nextarg, (double)LONG_MAX/1000);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue