tool: make a few char pointers point to const char instead

These are read-only.

Closes https://github.com/curl/curl/pull/4771
This commit is contained in:
Marcel Raad 2019-04-13 23:00:45 +02:00
parent 9603c8299f
commit a8d13336b5
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD
3 changed files with 3 additions and 4 deletions

View File

@ -1985,8 +1985,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
}
{
/* byte range requested */
char *tmp_range;
tmp_range = nextarg;
const char *tmp_range = nextarg;
while(*tmp_range != '\0') {
if(!ISDIGIT(*tmp_range) && *tmp_range != '-' && *tmp_range != ',') {
warnf(global, "Invalid character is found in given range. "

View File

@ -560,7 +560,7 @@ int ftpcccmethod(struct OperationConfig *config, const char *str)
return CURLFTPSSL_CCC_PASSIVE;
}
long delegation(struct OperationConfig *config, char *str)
long delegation(struct OperationConfig *config, const char *str)
{
if(curl_strequal("none", str))
return CURLGSSAPI_DELEGATION_NONE;

View File

@ -50,7 +50,7 @@ int ftpfilemethod(struct OperationConfig *config, const char *str);
int ftpcccmethod(struct OperationConfig *config, const char *str);
long delegation(struct OperationConfig *config, char *str);
long delegation(struct OperationConfig *config, const char *str);
ParameterError str2tls_max(long *val, const char *str);