Skip to content

Commit c0e65da

Browse files
TimWollawtarreau
authored andcommitted
CLEANUP: Apply the coccinelle patch for XXXcmp() on contrib/
Compare the various `cmp()` functions against zero.
1 parent ca4a25a commit c0e65da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spoa.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ use_spoe_engine(struct client *client)
10491049
return;
10501050

10511051
list_for_each_entry(eng, &client->worker->engines, list) {
1052-
if (!strcmp(eng->id, client->engine_id))
1052+
if (strcmp(eng->id, client->engine_id) == 0)
10531053
goto end;
10541054
}
10551055

@@ -1773,11 +1773,11 @@ main(int argc, char **argv)
17731773
configuration_file = optarg;
17741774
break;
17751775
case 'c':
1776-
if (!strcmp(optarg, "pipelining"))
1776+
if (strcmp(optarg, "pipelining") == 0)
17771777
pipelining = true;
1778-
else if (!strcmp(optarg, "async"))
1778+
else if (strcmp(optarg, "async") == 0)
17791779
async = true;
1780-
else if (!strcmp(optarg, "fragmentation"))
1780+
else if (strcmp(optarg, "fragmentation") == 0)
17811781
fragmentation = true;
17821782
else
17831783
fprintf(stderr, "WARNING: unsupported capability '%s'\n", optarg);

0 commit comments

Comments
 (0)