]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix ordering issue in protocol names
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Oct 2016 16:20:33 +0000 (12:20 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Oct 2016 16:20:33 +0000 (12:20 -0400)
The protocol names and enum must be kept
in the same order.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/log.c
lib/log.h

index 49c69efc8a9738850b216227286d10cba1255f4a..192e569d9679fe22b394043074a0d2b2d2c0bb13 100644 (file)
--- 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",
index 91cab3f96a0cdfb9b8ec36703d5766bf9264e8ff..551f12f3fedd9bf90f8892439e370b7649d45d1a 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
  * 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