diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-04-28 18:07:33 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-04-28 23:11:00 +0200 |
commit | 9ce7eee07042605045dcfd02a6f5b38ad5c8a05d (patch) | |
tree | 7a83474325c43f8d34233dae5bad509b2475ce74 /src | |
parent | 31303c34e90949847860db82c4768cab1482beda (diff) | |
download | curl-9ce7eee07042605045dcfd02a6f5b38ad5c8a05d.tar.gz |
checksrc: find bad indentation in conditions without open brace
If the previous line starts with if/while/for AND ends with a closed
parenthesis and there's an equal number of open and closed parentheses
on that line, verify that this line is indented $indent more steps, if
not a cpp line.
Also adjust the fall-out from this fix.
Closes #11054
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_getparam.c | 4 | ||||
-rw-r--r-- | src/tool_operate.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index b33e60300..c9810e9d4 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -884,7 +884,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ ParameterError pe = GetSizeParameter(global, nextarg, "rate", &value); if(pe != PARAM_OK) - return pe; + return pe; config->recvpersecond = value; config->sendpersecond = value; } @@ -1060,7 +1060,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ GetSizeParameter(global, nextarg, "max-filesize", &value); if(pe != PARAM_OK) - return pe; + return pe; config->max_filesize = value; } break; diff --git a/src/tool_operate.c b/src/tool_operate.c index 72b025330..06ae39396 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1878,7 +1878,7 @@ static CURLcode single_transfer(struct GlobalConfig *global, if(config->dns_ipv4_addr) my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr); if(config->dns_ipv6_addr) - my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr); + my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr); /* new in libcurl 7.6.2: */ my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options); |