mirror of
https://github.com/curl/curl.git
synced 2026-07-28 16:53:11 +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
|
|
@ -39,7 +39,7 @@ int main(int argc, const char **argv)
|
|||
entry_name = argv[1];
|
||||
entry_func = NULL;
|
||||
for(tmp = 0; s_entries[tmp].ptr; ++tmp) {
|
||||
if(strcmp(entry_name, s_entries[tmp].name) == 0) {
|
||||
if(!strcmp(entry_name, s_entries[tmp].name)) {
|
||||
entry_func = s_entries[tmp].ptr;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -970,7 +970,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
|
|||
curlx_fclose(server);
|
||||
|
||||
for(pf = formata; pf->f_mode; pf++)
|
||||
if(strcmp(pf->f_mode, mode) == 0)
|
||||
if(!strcmp(pf->f_mode, mode))
|
||||
break;
|
||||
if(!pf->f_mode) {
|
||||
nak(TFTP_EBADOP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue