From e2e210ddf07c843199e24d8ff28381e23c926136 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 7 Oct 2016 12:20:33 -0400 Subject: [PATCH] lib: Fix ordering issue in protocol names The protocol names and enum must be kept in the same order. Signed-off-by: Donald Sharp --- lib/log.c | 4 ++++ lib/log.h | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/log.c b/lib/log.c index 49c69efc8a..192e569d96 100644 --- a/lib/log.c +++ b/lib/log.c @@ -41,6 +41,10 @@ static int logfile_fd = -1; /* Used in signal handler. */ struct zlog *zlog_default = NULL; +/* + * This must be kept in the same order as the + * zlog_proto_t enum + */ const char *zlog_proto_names[] = { "NONE", diff --git a/lib/log.h b/lib/log.h index 91cab3f96a..551f12f3fe 100644 --- a/lib/log.h +++ b/lib/log.h @@ -41,6 +41,10 @@ * please use LOG_ERR instead. */ +/* + * This must be kept in the same order as + * zlog_proto_names[] + */ typedef enum { ZLOG_NONE, @@ -53,9 +57,9 @@ typedef enum ZLOG_OSPF6, ZLOG_LDP, ZLOG_ISIS, - ZLOG_RFP, ZLOG_PIM, - ZLOG_MASC + ZLOG_MASC, + ZLOG_RFP, } zlog_proto_t; /* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent -- 2.39.5