This fixes the use of the various *cmp functions to use != 0 or == 0.
const char *file, int linenum,
int *non_global_parsed)
{
- if (!strcmp(section_name, "global")) {
+ if (strcmp(section_name, "global") == 0) {
if (*non_global_parsed == 1)
_ha_diag_warning("parsing [%s:%d] : global section detected after a non-global one, the prevalence of their statements is unspecified\n", file, linenum);
}
if (!cli_has_level(appctx, ACCESS_LVL_ADMIN))
return 1;
- if (!strcmp(args[0], "expert-mode")) {
+ if (strcmp(args[0], "expert-mode") == 0) {
level = ACCESS_EXPERT;
level_str = "expert-mode";
}
- else if (!strcmp(args[0], "experimental-mode")) {
+ else if (strcmp(args[0], "experimental-mode") == 0) {
level = ACCESS_EXPERIMENTAL;
level_str = "experimental-mode";
}
while (1) {
/* check for duplicate server */
- if (!strcmp(srv->id, next->id)) {
+ if (strcmp(srv->id, next->id) == 0) {
ha_alert("Already exists a server with the same name in backend.\n");
goto out;
}