mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MINOR: debug: remove the trailing \n from BUG_ON() statements
These ones were added by mistake during the change of the cfgparse mechanism in 3.1, but they're corrupting the output of "debug counters" by leaving stray ']' on their own lines. We could possibly check them all once at boot but it doens't seem worth it. This should be backported to 3.1.
This commit is contained in:
parent
f9390a689f
commit
23705564ae
@ -983,7 +983,7 @@ static int cfg_parse_global_mode(char **args, int section_type,
|
||||
global.mode |= MODE_ZERO_WARNING;
|
||||
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_mode() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_mode() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1014,7 +1014,7 @@ static int cfg_parse_global_disable_poller(char **args, int section_type,
|
||||
global.tune.options &= ~GTUNE_USE_POLL;
|
||||
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_disable_poller() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_disable_poller() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1042,7 +1042,7 @@ static int cfg_parse_global_pidfile(char **args, int section_type,
|
||||
}
|
||||
global.pidfile = strdup(args[1]);
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_pidfile() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_pidfile() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ static int cfg_parse_global_non_std_directives(char **args, int section_type,
|
||||
} else if (strcmp(args[0], "expose-experimental-directives") == 0) {
|
||||
experimental_directives_allowed = 1;
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_non_std_directives() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_non_std_directives() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1365,7 +1365,7 @@ static int cfg_parse_global_tune_opts(char **args, int section_type,
|
||||
}
|
||||
}
|
||||
else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_tune_opts() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_tune_opts() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1398,7 +1398,7 @@ static int cfg_parse_global_tune_forward_opts(char **args, int section_type,
|
||||
global.tune.no_zero_copy_fwd |= NO_ZERO_COPY_FWD;
|
||||
}
|
||||
else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_tune_forward_opts() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_tune_forward_opts() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1418,7 +1418,7 @@ static int cfg_parse_global_unsupported_opts(char **args, int section_type,
|
||||
memprintf(err, "option '%s' is not supported any more (tune.bufsize is used instead).", args[0]);
|
||||
}
|
||||
else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_unsupported_opts() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_unsupported_opts() by unsupported keyword.");
|
||||
}
|
||||
|
||||
return -1;
|
||||
@ -1501,7 +1501,7 @@ static int cfg_parse_global_env_opts(char **args, int section_type,
|
||||
}
|
||||
}
|
||||
else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_env_opts() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_global_env_opts() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1592,7 +1592,7 @@ static int cfg_parse_tune_renice(char **args, int section_type, struct proxy *cu
|
||||
}
|
||||
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in cfg_parse_tune_renice() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in cfg_parse_tune_renice() by unsupported keyword.");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -2514,7 +2514,7 @@ static int _send_status(char **args, char *payload, struct appctx *appctx, void
|
||||
int pid;
|
||||
|
||||
BUG_ON((strcmp(args[0], "_send_status") != 0),
|
||||
"Triggered in _send_status by unsupported command name.\n");
|
||||
"Triggered in _send_status by unsupported command name.");
|
||||
|
||||
pid = atoi(args[2]);
|
||||
|
||||
@ -3530,7 +3530,7 @@ int mworker_cli_attach_server(char **errmsg)
|
||||
struct mworker_proc *child;
|
||||
|
||||
BUG_ON((mworker_proxy == NULL), "Triggered in mworker_cli_attach_server(), "
|
||||
"mworker_proxy must be created before this call.\n");
|
||||
"mworker_proxy must be created before this call.");
|
||||
|
||||
/* create all servers using the mworker_proc list */
|
||||
list_for_each_entry(child, &proc_list, list) {
|
||||
|
||||
@ -1043,7 +1043,7 @@ static int mworker_parse_global_max_reloads(char **args, int section_type, struc
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
BUG_ON(1, "Triggered in mworker_parse_global_max_reloads() by unsupported keyword.\n");
|
||||
BUG_ON(1, "Triggered in mworker_parse_global_max_reloads() by unsupported keyword.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -7120,7 +7120,7 @@ int restore_env(void)
|
||||
char *value;
|
||||
|
||||
BUG_ON(!init_env, "Triggered in restore_env(): must be preceded by "
|
||||
"backup_env(), which allocates init_env.\n");
|
||||
"backup_env(), which allocates init_env.");
|
||||
|
||||
while (*env) {
|
||||
pos = strchr(*env, '=');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user