]> git.proxmox.com Git - mirror_frr.git/commitdiff
bfdd: use MTYPE_STATIC
authorDavid Lamparter <equinox@diac24.net>
Fri, 21 Jun 2019 06:04:57 +0000 (08:04 +0200)
committerDavid Lamparter <equinox@diac24.net>
Fri, 21 Jun 2019 06:54:25 +0000 (08:54 +0200)
MTYPE definitions should be local to the file using them whereever
possible.  Also remove some superfluous ;

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bfdd/bfd.c
bfdd/bfd.h
bfdd/bfdd.c
bfdd/config.c

index 43544318204f9de701990cf603f247d2a5654b4f..c69e565d155c3b5f158dca25e05736ecf8eb5ab7 100644 (file)
 
 #include "bfd.h"
 
-DEFINE_QOBJ_TYPE(bfd_session);
+DEFINE_MTYPE_STATIC(BFDD, BFDD_CONFIG, "long-lived configuration memory")
+DEFINE_MTYPE_STATIC(BFDD, BFDD_SESSION_OBSERVER, "Session observer")
+DEFINE_MTYPE_STATIC(BFDD, BFDD_VRF, "BFD VRF")
+DEFINE_QOBJ_TYPE(bfd_session)
 
 /*
  * Prototypes
index 213e905bf0a86ab169f0b6f973d5c6a65bbf4003..ec31c8cbc6e9d9d56eca8735c2b3866bcf9d1c1c 100644 (file)
 #define BFDD_JSON_CONV_OPTIONS (0)
 #endif
 
-DECLARE_MGROUP(BFDD);
-DECLARE_MTYPE(BFDD_TMP);
-DECLARE_MTYPE(BFDD_CONFIG);
-DECLARE_MTYPE(BFDD_LABEL);
-DECLARE_MTYPE(BFDD_CONTROL);
-DECLARE_MTYPE(BFDD_SESSION_OBSERVER);
-DECLARE_MTYPE(BFDD_NOTIFICATION);
-DECLARE_MTYPE(BFDD_VRF);
+DECLARE_MGROUP(BFDD)
+DECLARE_MTYPE(BFDD_CONTROL)
+DECLARE_MTYPE(BFDD_NOTIFICATION)
 
 struct bfd_timers {
        uint32_t desired_min_tx;
@@ -259,9 +254,9 @@ struct bfd_session {
        uint64_t refcount; /* number of pointers referencing this. */
 
        /* VTY context data. */
-       QOBJ_FIELDS;
+       QOBJ_FIELDS
 };
-DECLARE_QOBJ_TYPE(bfd_session);
+DECLARE_QOBJ_TYPE(bfd_session)
 
 struct peer_label {
        TAILQ_ENTRY(peer_label) pl_entry;
index 06e01abcfa31031f4f8162c4d9cb3a2f5ed07778..6c277c98f53a4e69bb174cda2c866b85a141e613 100644 (file)
 /*
  * FRR related code.
  */
-DEFINE_MGROUP(BFDD, "Bidirectional Forwarding Detection Daemon");
-DEFINE_MTYPE(BFDD, BFDD_TMP, "short-lived temporary memory");
-DEFINE_MTYPE(BFDD, BFDD_CONFIG, "long-lived configuration memory");
-DEFINE_MTYPE(BFDD, BFDD_LABEL, "long-lived label memory");
-DEFINE_MTYPE(BFDD, BFDD_CONTROL, "long-lived control socket memory");
-DEFINE_MTYPE(BFDD, BFDD_SESSION_OBSERVER, "Session observer");
-DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "short-lived control notification data");
-DEFINE_MTYPE(BFDD, BFDD_VRF, "BFD VRF");
+DEFINE_MGROUP(BFDD, "Bidirectional Forwarding Detection Daemon")
+DEFINE_MTYPE(BFDD, BFDD_CONTROL, "long-lived control socket memory")
+DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "short-lived control notification data")
 
 /* Master of threads. */
 struct thread_master *master;
index 74e7d63d0c6ee69790f43fb9085083a94e11f231..0c0bac0aaa3150e99522cbf5be19c1ae26bb43d4 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "bfd.h"
 
+DEFINE_MTYPE_STATIC(BFDD, BFDD_LABEL, "long-lived label memory")
+
 /*
  * Definitions
  */