mirror of
https://github.com/curl/curl.git
synced 2026-07-29 01:53:08 +03:00
tidy-up: drop stray comparisons with literal zero
Drop from: - strcmp, strcmpi, strncmp, memcmp, lstat, getrlimit, setrlimit, fseek, fstat - autotools detection snippets. - smooth-gtk-thread: simplify `!var != 0` expression. Closes #21947
This commit is contained in:
parent
2f3fa479dd
commit
97aed9c960
43 changed files with 142 additions and 143 deletions
|
|
@ -662,14 +662,14 @@ static CURLcode ssh_force_knownhost_key_type(struct Curl_easy *data,
|
|||
if(!curlx_str_number(&p, &port, 0xffff) &&
|
||||
(kh_name_end && (port == conn->origin->port))) {
|
||||
kh_name_size = strlen(store->name) - 1 - strlen(kh_name_end);
|
||||
if(strncmp(store->name + 1,
|
||||
conn->origin->hostname, kh_name_size) == 0) {
|
||||
if(!strncmp(store->name + 1, conn->origin->hostname,
|
||||
kh_name_size)) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(strcmp(store->name, conn->origin->hostname) == 0) {
|
||||
else if(!strcmp(store->name, conn->origin->hostname)) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue