This reapplies strcmp.cocci across the whole src/ tree.
memprintf(err, "'%s' directive is experimental, must be allowed via a global 'expose-experimental-directives'", args[cur_arg]);
return ERR_ALERT | ERR_FATAL;
}
- if (!strcasecmp(args[cur_arg + 1], "on")) {
+ if (strcasecmp(args[cur_arg + 1], "on") == 0) {
conf->ktls = 1;
- } else if (!strcasecmp(args[cur_arg + 1], "off")) {
+ } else if (strcasecmp(args[cur_arg + 1], "off") == 0) {
conf->ktls = 0;
} else {
memprintf(err, "'%s' expects \"on\" or \"off\" as an argument, got '%s'.",
return ERR_ALERT | ERR_FATAL;
}
- if (!strcasecmp(args[*cur_arg + 1], "on")) {
+ if (strcasecmp(args[*cur_arg + 1], "on") == 0) {
newsrv->ssl_ctx.options |= SRV_SSL_O_KTLS;
- } else if (!strcasecmp(args[*cur_arg + 1], "off")) {
+ } else if (strcasecmp(args[*cur_arg + 1], "off") == 0) {
newsrv->ssl_ctx.options &= ~SRV_SSL_O_KTLS;
} else {
memprintf(err, "'%s' expects \"on\" or \"off\" as an argument, got '%s'.",
global.cli_fe->maxconn = maxconn;
}
else if (strcmp(args[1], "calculate-max-counters") == 0) {
- if (!strcasecmp(args[2], "on"))
+ if (strcasecmp(args[2], "on") == 0)
return 0;
- else if (!strcasecmp(args[2], "off")) {
+ else if (strcasecmp(args[2], "off") == 0) {
global.tune.options |= GTUNE_NO_MAX_COUNTER;
return 0;
}
return -1;
for (i = 0; ha_cpu_affinity[i].name != NULL; i++) {
- if (!strcmp(args[1], ha_cpu_affinity[i].name)) {
+ if (strcmp(args[1], ha_cpu_affinity[i].name) == 0) {
cpu_policy_conf.affinity |= ha_cpu_affinity[i].affinity_flags;
if (*args[2] != 0) {
struct cpu_affinity_optional *optional = ha_cpu_affinity[i].optional;
if (optional) {
for (i = 0; optional[i].name; i++) {
- if (!strcmp(args[2], optional[i].name)) {
+ if (strcmp(args[2], optional[i].name) == 0) {
cpu_policy_conf.affinity |= optional[i].affinity_flag;
return 0;
}
return -1;
if (*args[2] != 0) {
- if (!strcmp(args[2], "threads-per-core")) {
- if (!strcmp(args[3], "1"))
+ if (strcmp(args[2], "threads-per-core") == 0) {
+ if (strcmp(args[3], "1") == 0)
cpu_policy_conf.flags |= CPU_POLICY_ONE_THREAD_PER_CORE;
- else if (strcmp(args[3], "auto")) {
+ else if (strcmp(args[3], "auto") != 0) {
memprintf(err, "'%s' passed an unknown value '%s' to keyword '%s', known values are 1 or auto", args[0], args[3], args[2]);
return -1;
}
goto error;
}
- if (!strcmp(args[1], "request"))
+ if (strcmp(args[1], "request") == 0)
list = &curpx->filter_sequence.req;
- else if (!strcmp(args[1], "response"))
+ else if (strcmp(args[1], "response") == 0)
list = &curpx->filter_sequence.res;
else {
memprintf(err,
int ret = ERR_NONE;
list_for_each_entry(fconf, &px->filter_configs, list) {
- if (!strcmp(elt->flt_name, fconf->name)) {
+ if (strcmp(elt->flt_name, fconf->name) == 0) {
elt->flt_conf = fconf;
break;
}
rule->arg.do_log.orig = id;
while (*args[*orig_arg]) {
- if (!strcmp(args[*orig_arg], "profile")) {
+ if (strcmp(args[*orig_arg], "profile") == 0) {
if (!*args[*orig_arg + 1]) {
memprintf(err,
"action '%s': 'profile' expects argument.",
if (!s->conf.gencrt.key.type)
type = EVP_PKEY_RSA;
else {
- if (!strcmp(s->conf.gencrt.key.type, "RSA"))
+ if (strcmp(s->conf.gencrt.key.type, "RSA") == 0)
type = EVP_PKEY_RSA;
- else if (!strcmp(s->conf.gencrt.key.type, "ECDSA"))
+ else if (strcmp(s->conf.gencrt.key.type, "ECDSA") == 0)
type = EVP_PKEY_EC;
else {
memprintf(err, "keyword 'keytype' requires either 'RSA' or 'ECDSA'.");