Due to an off-by-one error, L_BUG messages (e.g. from ASSERT()) were
handled as L_DBG messages and therefore ignored by our CI.
#define L_AUTH "\007" /* Authorization failed etc. */
#define L_FATAL "\010" /* Fatal errors */
#define L_BUG "\011" /* BIRD bugs */
+#define L_MAX 10
void debug(const char *msg, ...); /* Printf to debug output */
void debug_safe(const char *msg); /* Printf to debug output, async-safe */
#ifdef HAVE_SYSLOG_H
#include <sys/syslog.h>
-static int syslog_priorities[] = {
+static int syslog_priorities[L_MAX] = {
LOG_DEBUG,
LOG_DEBUG,
LOG_DEBUG,
};
#endif
-static char *class_names[] = {
+static char *class_names[L_MAX] = {
"???",
"DBG",
"TRACE",
va_list args;
va_start(args, msg);
- if (*msg >= 1 && *msg <= 8)
+ if (*msg >= 1 && *msg < L_MAX)
class = *msg++;
vlog(class, msg, args);
va_end(args);
if (tbf_limit(f) && (f->drop > 1))
return;
- if (*msg >= 1 && *msg <= 8)
+ if (*msg >= 1 && *msg < L_MAX)
class = *msg++;
va_start(args, msg);