diff options
| author | David Lamparter <equinox@diac24.net> | 2021-02-21 06:18:10 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2021-03-17 06:18:17 +0100 |
| commit | bf8d3d6aca3f20255a621ed1c148fd05b3a8ae5c (patch) | |
| tree | cd62a7c64fe8eb9f3252e1b608f1fb939c2a772c /lib | |
| parent | 15c05f1edf079bc03b277e44426a8af8616bb10b (diff) | |
*: require semicolon after DEFINE_MTYPE & co
Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet. Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition. And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...
With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.
Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib')
65 files changed, 157 insertions, 152 deletions
@@ -32,7 +32,7 @@ #include "vty.h" #include "bfd.h" -DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info") +DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info"); static int bfd_debug = 0; static struct bfd_gbl bfd_gbl; diff --git a/lib/buffer.c b/lib/buffer.c index 42796faae8..7929b3709d 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -29,8 +29,8 @@ #include <stddef.h> -DEFINE_MTYPE_STATIC(LIB, BUFFER, "Buffer") -DEFINE_MTYPE_STATIC(LIB, BUFFER_DATA, "Buffer data") +DEFINE_MTYPE_STATIC(LIB, BUFFER, "Buffer"); +DEFINE_MTYPE_STATIC(LIB, BUFFER_DATA, "Buffer data"); /* Buffer master. */ struct buffer { diff --git a/lib/command.c b/lib/command.c index 6a4d504b2f..770e2fc5ac 100644 --- a/lib/command.c +++ b/lib/command.c @@ -51,8 +51,8 @@ #include "frrscript.h" -DEFINE_MTYPE_STATIC(LIB, HOST, "Host config") -DEFINE_MTYPE(LIB, COMPLETION, "Completion item") +DEFINE_MTYPE_STATIC(LIB, HOST, "Host config"); +DEFINE_MTYPE(LIB, COMPLETION, "Completion item"); #define item(x) \ { \ diff --git a/lib/command.h b/lib/command.h index 71abb20b05..14e51486ea 100644 --- a/lib/command.h +++ b/lib/command.h @@ -34,7 +34,7 @@ extern "C" { #endif -DECLARE_MTYPE(COMPLETION) +DECLARE_MTYPE(COMPLETION); /* * From RFC 1123 (Requirements for Internet Hosts), Section 2.1 on hostnames: diff --git a/lib/command_graph.c b/lib/command_graph.c index d30d9ab702..c6c3840455 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -26,11 +26,11 @@ #include "command_graph.h" -DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens") -DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text") -DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help") -DEFINE_MTYPE(LIB, CMD_ARG, "Command Argument") -DEFINE_MTYPE_STATIC(LIB, CMD_VAR, "Command Argument Name") +DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens"); +DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text"); +DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help"); +DEFINE_MTYPE(LIB, CMD_ARG, "Command Argument"); +DEFINE_MTYPE_STATIC(LIB, CMD_VAR, "Command Argument Name"); struct cmd_token *cmd_token_new(enum cmd_token_type type, uint8_t attr, const char *text, const char *desc) diff --git a/lib/command_graph.h b/lib/command_graph.h index 86715410ce..2754dca67d 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -37,7 +37,7 @@ extern "C" { #endif -DECLARE_MTYPE(CMD_ARG) +DECLARE_MTYPE(CMD_ARG); struct vty; diff --git a/lib/command_match.c b/lib/command_match.c index 801b05f157..e9e8466ffd 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -26,7 +26,7 @@ #include "command_match.h" #include "memory.h" -DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack") +DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack"); #ifdef TRACE_MATCHER #define TM 1 diff --git a/lib/command_parse.y b/lib/command_parse.y index 8135d02b4b..5ebc19b278 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -54,7 +54,7 @@ #include "command_graph.h" #include "log.h" - DECLARE_MTYPE(LEX) + DECLARE_MTYPE(LEX); #define YYSTYPE CMD_YYSTYPE #define YYLTYPE CMD_YYLTYPE @@ -376,7 +376,7 @@ selector: '[' selector_seq_seq ']' varname_token #undef scanner -DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)") +DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)"); void cmd_graph_parse (struct graph *graph, const struct cmd_element *cmd) diff --git a/lib/compiler.h b/lib/compiler.h index b5cfbefeb5..ab95aa09c0 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -136,6 +136,9 @@ extern "C" { #define macro_inline static inline __attribute__((unused)) #define macro_pure static inline __attribute__((unused, pure)) +/* if the macro ends with a function definition */ +#define MACRO_REQUIRE_SEMICOLON() \ + _Static_assert(1, "please add a semicolon after this macro") /* variadic macros, use like: * #define V_0() ... diff --git a/lib/distribute.c b/lib/distribute.c index 3ea60c8772..60bd0a47bb 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -27,10 +27,10 @@ #include "distribute.h" #include "memory.h" -DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_CTX, "Distribute ctx") -DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE, "Distribute list") -DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_IFNAME, "Dist-list ifname") -DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_NAME, "Dist-list name") +DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_CTX, "Distribute ctx"); +DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE, "Distribute list"); +DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_IFNAME, "Dist-list ifname"); +DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_NAME, "Dist-list name"); static struct list *dist_ctx_list; diff --git a/lib/ferr.c b/lib/ferr.c index 691da495cf..513ef5ebec 100644 --- a/lib/ferr.c +++ b/lib/ferr.c @@ -35,7 +35,7 @@ #include "linklist.h" #include "frr_pthread.h" -DEFINE_MTYPE_STATIC(LIB, ERRINFO, "error information") +DEFINE_MTYPE_STATIC(LIB, ERRINFO, "error information"); /* * Thread-specific key for temporary storage of allocated ferr. diff --git a/lib/filter.c b/lib/filter.c index f5ae9ee2b7..83423ba321 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -31,9 +31,9 @@ #include "libfrr.h" #include "northbound_cli.h" -DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List") -DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str") -DEFINE_MTYPE_STATIC(LIB, ACCESS_FILTER, "Access Filter") +DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List"); +DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str"); +DEFINE_MTYPE_STATIC(LIB, ACCESS_FILTER, "Access Filter"); /* Static structure for mac access_list's master. */ static struct access_master access_master_mac = { diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index 3f0179fbc1..03359f4d18 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -30,8 +30,8 @@ #include "zlog.h" #include "libfrr_trace.h" -DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread") -DEFINE_MTYPE_STATIC(LIB, PTHREAD_PRIM, "POSIX sync primitives") +DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread"); +DEFINE_MTYPE_STATIC(LIB, PTHREAD_PRIM, "POSIX sync primitives"); /* default frr_pthread start/stop routine prototypes */ static void *fpt_run(void *arg); diff --git a/lib/frr_zmq.c b/lib/frr_zmq.c index 33adcd7b80..05f0fce5fc 100644 --- a/lib/frr_zmq.c +++ b/lib/frr_zmq.c @@ -26,7 +26,7 @@ #include "log.h" #include "lib_errors.h" -DEFINE_MTYPE_STATIC(LIB, ZEROMQ_CB, "ZeroMQ callback") +DEFINE_MTYPE_STATIC(LIB, ZEROMQ_CB, "ZeroMQ callback"); /* libzmq's context */ void *frrzmq_context = NULL; diff --git a/lib/frrcu.c b/lib/frrcu.c index 7e6475b648..c6c19bd562 100644 --- a/lib/frrcu.c +++ b/lib/frrcu.c @@ -54,8 +54,8 @@ #include "seqlock.h" #include "atomlist.h" -DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread") -DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier") +DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread"); +DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier"); DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head) diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index a40b815caa..209765bd6f 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -34,7 +34,7 @@ #define GRAMMAR_STR "CLI grammar sandbox\n" -DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc") +DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc"); /** headers **/ void grammar_sandbox_init(void); diff --git a/lib/graph.c b/lib/graph.c index 128e45c570..1cbe1b90f9 100644 --- a/lib/graph.c +++ b/lib/graph.c @@ -25,8 +25,8 @@ #include "memory.h" #include "buffer.h" -DEFINE_MTYPE_STATIC(LIB, GRAPH, "Graph") -DEFINE_MTYPE_STATIC(LIB, GRAPH_NODE, "Graph Node") +DEFINE_MTYPE_STATIC(LIB, GRAPH, "Graph"); +DEFINE_MTYPE_STATIC(LIB, GRAPH_NODE, "Graph Node"); struct graph *graph_new(void) { struct graph *graph = XCALLOC(MTYPE_GRAPH, sizeof(struct graph)); diff --git a/lib/hash.c b/lib/hash.c index ec616ee724..e9132f7907 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -31,9 +31,9 @@ #include "frr_pthread.h" #include "libfrr_trace.h" -DEFINE_MTYPE_STATIC(LIB, HASH, "Hash") -DEFINE_MTYPE_STATIC(LIB, HASH_BUCKET, "Hash Bucket") -DEFINE_MTYPE_STATIC(LIB, HASH_INDEX, "Hash Index") +DEFINE_MTYPE_STATIC(LIB, HASH, "Hash"); +DEFINE_MTYPE_STATIC(LIB, HASH_BUCKET, "Hash Bucket"); +DEFINE_MTYPE_STATIC(LIB, HASH_INDEX, "Hash Index"); static pthread_mutex_t _hashes_mtx = PTHREAD_MUTEX_INITIALIZER; static struct list *_hashes; diff --git a/lib/hook.c b/lib/hook.c index 5a8ad00d66..895243aad7 100644 --- a/lib/hook.c +++ b/lib/hook.c @@ -23,7 +23,7 @@ #include "memory.h" #include "hook.h" -DEFINE_MTYPE_STATIC(LIB, HOOK_ENTRY, "Hook entry") +DEFINE_MTYPE_STATIC(LIB, HOOK_ENTRY, "Hook entry"); void _hook_register(struct hook *hook, struct hookent *stackent, void *funcptr, void *arg, bool has_arg, struct frrmod_runtime *module, diff --git a/lib/id_alloc.c b/lib/id_alloc.c index 95096fa5f0..9179dc4299 100644 --- a/lib/id_alloc.c +++ b/lib/id_alloc.c @@ -29,13 +29,14 @@ #include <inttypes.h> -DEFINE_MTYPE_STATIC(LIB, IDALLOC_ALLOCATOR, "ID Number Allocator") -DEFINE_MTYPE_STATIC(LIB, IDALLOC_ALLOCATOR_NAME, "ID Number Allocator Name") -DEFINE_MTYPE_STATIC(LIB, IDALLOC_DIRECTORY, "ID Number Allocator Directory") +DEFINE_MTYPE_STATIC(LIB, IDALLOC_ALLOCATOR, "ID Number Allocator"); +DEFINE_MTYPE_STATIC(LIB, IDALLOC_ALLOCATOR_NAME, "ID Number Allocator Name"); +DEFINE_MTYPE_STATIC(LIB, IDALLOC_DIRECTORY, "ID Number Allocator Directory"); DEFINE_MTYPE_STATIC(LIB, IDALLOC_SUBDIRECTORY, - "ID Number Allocator Subdirectory") -DEFINE_MTYPE_STATIC(LIB, IDALLOC_PAGE, "ID Number Allocator Page") -DEFINE_MTYPE_STATIC(LIB, IDALLOC_POOL, "ID Number temporary holding pool entry") + "ID Number Allocator Subdirectory"); +DEFINE_MTYPE_STATIC(LIB, IDALLOC_PAGE, "ID Number Allocator Page"); +DEFINE_MTYPE_STATIC(LIB, IDALLOC_POOL, + "ID Number temporary holding pool entry"); #if UINT_MAX >= UINT32_MAX #define FFS32(x) ffs(x) @@ -39,11 +39,11 @@ #include "lib/if_clippy.c" #endif -DEFINE_MTYPE_STATIC(LIB, IF, "Interface") -DEFINE_MTYPE_STATIC(LIB, CONNECTED, "Connected") -DEFINE_MTYPE_STATIC(LIB, NBR_CONNECTED, "Neighbor Connected") -DEFINE_MTYPE(LIB, CONNECTED_LABEL, "Connected interface label") -DEFINE_MTYPE_STATIC(LIB, IF_LINK_PARAMS, "Informational Link Parameters") +DEFINE_MTYPE_STATIC(LIB, IF, "Interface"); +DEFINE_MTYPE_STATIC(LIB, CONNECTED, "Connected"); +DEFINE_MTYPE_STATIC(LIB, NBR_CONNECTED, "Neighbor Connected"); +DEFINE_MTYPE(LIB, CONNECTED_LABEL, "Connected interface label"); +DEFINE_MTYPE_STATIC(LIB, IF_LINK_PARAMS, "Informational Link Parameters"); static struct interface *if_lookup_by_ifindex(ifindex_t ifindex, vrf_id_t vrf_id); @@ -31,7 +31,7 @@ extern "C" { #endif -DECLARE_MTYPE(CONNECTED_LABEL) +DECLARE_MTYPE(CONNECTED_LABEL); /* Interface link-layer type, if known. Derived from: * diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 1973d40be4..8282e476df 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -26,10 +26,11 @@ #include "if.h" #include "if_rmap.h" -DEFINE_MTYPE_STATIC(LIB, IF_RMAP_CTX, "Interface route map container") -DEFINE_MTYPE_STATIC(LIB, IF_RMAP_CTX_NAME, "Interface route map container name") -DEFINE_MTYPE_STATIC(LIB, IF_RMAP, "Interface route map") -DEFINE_MTYPE_STATIC(LIB, IF_RMAP_NAME, "I.f. route map name") +DEFINE_MTYPE_STATIC(LIB, IF_RMAP_CTX, "Interface route map container"); +DEFINE_MTYPE_STATIC(LIB, IF_RMAP_CTX_NAME, + "Interface route map container name"); +DEFINE_MTYPE_STATIC(LIB, IF_RMAP, "Interface route map"); +DEFINE_MTYPE_STATIC(LIB, IF_RMAP_NAME, "I.f. route map name"); static struct list *if_rmap_ctx_list; diff --git a/lib/keychain.c b/lib/keychain.c index 82fd6a65f2..07f65f1825 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -25,8 +25,8 @@ #include "linklist.h" #include "keychain.h" -DEFINE_MTYPE_STATIC(LIB, KEY, "Key") -DEFINE_MTYPE_STATIC(LIB, KEYCHAIN, "Key chain") +DEFINE_MTYPE_STATIC(LIB, KEY, "Key"); +DEFINE_MTYPE_STATIC(LIB, KEYCHAIN, "Key chain"); DEFINE_QOBJ_TYPE(keychain) DEFINE_QOBJ_TYPE(key) diff --git a/lib/ldp_sync.c b/lib/ldp_sync.c index c9d7eb37cf..8912d15589 100644 --- a/lib/ldp_sync.c +++ b/lib/ldp_sync.c @@ -31,7 +31,7 @@ #include "ldp_sync.h" /* Library code */ -DEFINE_MTYPE_STATIC(LIB, LDP_SYNC_INFO, "LDP SYNC info") +DEFINE_MTYPE_STATIC(LIB, LDP_SYNC_INFO, "LDP SYNC info"); /* * ldp_sync_info_create - Allocate the LDP_SYNC information diff --git a/lib/link_state.c b/lib/link_state.c index ecf0d0698d..7f0d2a1245 100644 --- a/lib/link_state.c +++ b/lib/link_state.c @@ -36,7 +36,7 @@ #include "link_state.h" /* Link State Memory allocation */ -DEFINE_MTYPE_STATIC(LIB, LS_DB, "Link State Database") +DEFINE_MTYPE_STATIC(LIB, LS_DB, "Link State Database"); /** * Link State Node management functions diff --git a/lib/linklist.c b/lib/linklist.c index 43c2002231..5de6c8a817 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -25,8 +25,8 @@ #include "memory.h" #include "libfrr_trace.h" -DEFINE_MTYPE_STATIC(LIB, LINK_LIST, "Link List") -DEFINE_MTYPE_STATIC(LIB, LINK_NODE, "Link Node") +DEFINE_MTYPE_STATIC(LIB, LINK_LIST, "Link List"); +DEFINE_MTYPE_STATIC(LIB, LINK_NODE, "Link Node"); struct list *list_new(void) { diff --git a/lib/memory.c b/lib/memory.c index a377d3b945..0dc8e90524 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -34,8 +34,8 @@ static struct memgroup *mg_first = NULL; struct memgroup **mg_insert = &mg_first; -DEFINE_MGROUP(LIB, "libfrr") -DEFINE_MTYPE(LIB, TMP, "Temporary memory") +DEFINE_MGROUP(LIB, "libfrr"); +DEFINE_MTYPE(LIB, TMP, "Temporary memory"); static inline void mt_count_alloc(struct memtype *mt, size_t size, void *ptr) { diff --git a/lib/memory.h b/lib/memory.h index e9db12fce2..c95602f485 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -56,20 +56,20 @@ struct memgroup { /* macro usage: * * mydaemon.h - * DECLARE_MGROUP(MYDAEMON) - * DECLARE_MTYPE(MYDAEMON_COMMON) + * DECLARE_MGROUP(MYDAEMON); + * DECLARE_MTYPE(MYDAEMON_COMMON); * * mydaemon.c - * DEFINE_MGROUP(MYDAEMON, "my daemon memory") + * DEFINE_MGROUP(MYDAEMON, "my daemon memory"); * DEFINE_MTYPE(MYDAEMON, MYDAEMON_COMMON, - * "this mtype is used in multiple files in mydaemon") + * "this mtype is used in multiple files in mydaemon"); * foo = qmalloc(MTYPE_MYDAEMON_COMMON, sizeof(*foo)) * * mydaemon_io.c * bar = qmalloc(MTYPE_MYDAEMON_COMMON, sizeof(*bar)) * * DEFINE_MTYPE_STATIC(MYDAEMON, MYDAEMON_IO, - * "this mtype is used only in this file") + * "this mtype is used only in this file"); * baz = qmalloc(MTYPE_MYDAEMON_IO, sizeof(*baz)) * * Note: Naming conventions (MGROUP_ and MTYPE_ prefixes are enforced @@ -78,7 +78,7 @@ struct memgroup { * but MGROUP_* aren't. */ -#define DECLARE_MGROUP(name) extern struct memgroup _mg_##name; +#define DECLARE_MGROUP(name) extern struct memgroup _mg_##name #define _DEFINE_MGROUP(mname, desc, ...) \ struct memgroup _mg_##mname \ __attribute__((section(".data.mgroups"))) = { \ @@ -104,7 +104,7 @@ struct memgroup { _mg_##mname.next->ref = _mg_##mname.ref; \ *_mg_##mname.ref = _mg_##mname.next; \ } \ - /* end */ + MACRO_REQUIRE_SEMICOLON() /* end */ #define DEFINE_MGROUP(mname, desc) \ _DEFINE_MGROUP(mname, desc, ) @@ -112,7 +112,7 @@ struct memgroup { _DEFINE_MGROUP(mname, desc, .active_at_exit = true) #define DECLARE_MTYPE(name) \ - extern struct memtype MTYPE_##name[1]; \ + extern struct memtype MTYPE_##name[1] \ /* end */ #define DEFINE_MTYPE_ATTR(group, mname, attr, desc) \ @@ -140,7 +140,7 @@ struct memgroup { MTYPE_##mname->next->ref = MTYPE_##mname->ref; \ *MTYPE_##mname->ref = MTYPE_##mname->next; \ } \ - /* end */ + MACRO_REQUIRE_SEMICOLON() /* end */ #define DEFINE_MTYPE(group, name, desc) \ DEFINE_MTYPE_ATTR(group, name, , desc) \ @@ -150,8 +150,8 @@ struct memgroup { DEFINE_MTYPE_ATTR(group, name, static, desc) \ /* end */ -DECLARE_MGROUP(LIB) -DECLARE_MTYPE(TMP) +DECLARE_MGROUP(LIB); +DECLARE_MTYPE(TMP); extern void *qmalloc(struct memtype *mt, size_t size) diff --git a/lib/module.c b/lib/module.c index 3d299a6a2e..e103493cf5 100644 --- a/lib/module.c +++ b/lib/module.c @@ -27,8 +27,8 @@ #include "memory.h" #include "version.h" -DEFINE_MTYPE_STATIC(LIB, MODULE_LOADNAME, "Module loading name") -DEFINE_MTYPE_STATIC(LIB, MODULE_LOADARGS, "Module loading arguments") +DEFINE_MTYPE_STATIC(LIB, MODULE_LOADNAME, "Module loading name"); +DEFINE_MTYPE_STATIC(LIB, MODULE_LOADARGS, "Module loading arguments"); static struct frrmod_info frrmod_default_info = { .name = "libfrr", diff --git a/lib/netns_linux.c b/lib/netns_linux.c index c688433983..cde842b88c 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -40,8 +40,8 @@ #include "vrf.h" #include "lib_errors.h" -DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context") -DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name") +DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context"); +DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name"); static inline int ns_compare(const struct ns *ns, const struct ns *ns2); static struct ns *ns_lookup_name_internal(const char *name); diff --git a/lib/netns_other.c b/lib/netns_other.c index 3fc4b8df4b..b6570d3b9e 100644 --- a/lib/netns_other.c +++ b/lib/netns_other.c @@ -26,8 +26,8 @@ #include "log.h" #include "memory.h" -DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context") -DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name") +DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context"); +DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name"); static inline int ns_compare(const struct ns *ns, const struct ns *ns2); diff --git a/lib/nexthop.c b/lib/nexthop.c index dd8c108205..17ef95c687 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -34,8 +34,8 @@ #include "vrf.h" #include "nexthop_group.h" -DEFINE_MTYPE_STATIC(LIB, NEXTHOP, "Nexthop") -DEFINE_MTYPE_STATIC(LIB, NH_LABEL, "Nexthop label") +DEFINE_MTYPE_STATIC(LIB, NEXTHOP, "Nexthop"); +DEFINE_MTYPE_STATIC(LIB, NH_LABEL, "Nexthop label"); static int _nexthop_labels_cmp(const struct nexthop *nh1, const struct nexthop *nh2) diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index dee98ad8d7..bf74cb62cc 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -32,7 +32,7 @@ #include "lib/nexthop_group_clippy.c" #endif -DEFINE_MTYPE_STATIC(LIB, NEXTHOP_GROUP, "Nexthop Group") +DEFINE_MTYPE_STATIC(LIB, NEXTHOP_GROUP, "Nexthop Group"); /* * Internal struct used to hold nhg config strings diff --git a/lib/northbound.c b/lib/northbound.c index b6d3518285..27ba632c9d 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -32,9 +32,9 @@ #include "northbound_db.h" #include "frrstr.h" -DEFINE_MTYPE_STATIC(LIB, NB_NODE, "Northbound Node") -DEFINE_MTYPE_STATIC(LIB, NB_CONFIG, "Northbound Configuration") -DEFINE_MTYPE_STATIC(LIB, NB_CONFIG_ENTRY, "Northbound Configuration Entry") +DEFINE_MTYPE_STATIC(LIB, NB_NODE, "Northbound Node"); +DEFINE_MTYPE_STATIC(LIB, NB_CONFIG, "Northbound Configuration"); +DEFINE_MTYPE_STATIC(LIB, NB_CONFIG_ENTRY, "Northbound Configuration Entry"); /* Running configuration - shouldn't be modified directly. */ struct nb_config *running_config; diff --git a/lib/northbound_confd.c b/lib/northbound_confd.c index 8acba9fd2b..f3e7014338 100644 --- a/lib/northbound_confd.c +++ b/lib/northbound_confd.c @@ -32,7 +32,7 @@ #include <confd_dp.h> #include <confd_maapi.h> -DEFINE_MTYPE_STATIC(LIB, CONFD, "ConfD module") +DEFINE_MTYPE_STATIC(LIB, CONFD, "ConfD module"); static struct debug nb_dbg_client_confd = {0, "Northbound client: ConfD"}; diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c index c027f4de72..1c71312ac8 100644 --- a/lib/northbound_sysrepo.c +++ b/lib/northbound_sysrepo.c @@ -32,7 +32,7 @@ #include <sysrepo/values.h> #include <sysrepo/xpath.h> -DEFINE_MTYPE_STATIC(LIB, SYSREPO, "Sysrepo module") +DEFINE_MTYPE_STATIC(LIB, SYSREPO, "Sysrepo module"); static struct debug nb_dbg_client_sysrepo = {0, "Northbound client: Sysrepo"}; diff --git a/lib/plist.c b/lib/plist.c index 4588dfe1d3..b77c1c11f3 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -33,10 +33,10 @@ #include "plist_int.h" -DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST, "Prefix List") -DEFINE_MTYPE_STATIC(LIB, MPREFIX_LIST_STR, "Prefix List Str") -DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST_ENTRY, "Prefix List Entry") -DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST_TRIE, "Prefix List Trie Table") +DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST, "Prefix List"); +DEFINE_MTYPE_STATIC(LIB, MPREFIX_LIST_STR, "Prefix List Str"); +DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST_ENTRY, "Prefix List Entry"); +DEFINE_MTYPE_STATIC(LIB, PREFIX_LIST_TRIE, "Prefix List Trie Table"); /* not currently changeable, code assumes bytes further down */ #define PLC_BITS 8 diff --git a/lib/prefix.c b/lib/prefix.c index 5e5c2d89a8..afc4d3d5c2 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -32,8 +32,8 @@ #include "printfrr.h" #include "vxlan.h" -DEFINE_MTYPE_STATIC(LIB, PREFIX, "Prefix") -DEFINE_MTYPE_STATIC(LIB, PREFIX_FLOWSPEC, "Prefix Flowspec") +DEFINE_MTYPE_STATIC(LIB, PREFIX, "Prefix"); +DEFINE_MTYPE_STATIC(LIB, PREFIX_FLOWSPEC, "Prefix Flowspec"); /* Maskbit. */ static const uint8_t maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0, diff --git a/lib/privs.c b/lib/privs.c index 5ca3c0d886..49761af871 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -28,7 +28,7 @@ #include "lib_errors.h" #include "lib/queue.h" -DEFINE_MTYPE_STATIC(LIB, PRIVS, "Privilege information") +DEFINE_MTYPE_STATIC(LIB, PRIVS, "Privilege information"); /* * Different capabilities/privileges apis have different characteristics: some diff --git a/lib/pullwr.c b/lib/pullwr.c index 0c326f29d4..15563d2471 100644 --- a/lib/pullwr.c +++ b/lib/pullwr.c @@ -48,8 +48,8 @@ struct pullwr { int64_t maxspin; /* PULLWR_MAXSPIN */ }; -DEFINE_MTYPE_STATIC(LIB, PULLWR_HEAD, "pull-driven write controller") -DEFINE_MTYPE_STATIC(LIB, PULLWR_BUF, "pull-driven write buffer") +DEFINE_MTYPE_STATIC(LIB, PULLWR_HEAD, "pull-driven write controller"); +DEFINE_MTYPE_STATIC(LIB, PULLWR_BUF, "pull-driven write buffer"); static int pullwr_run(struct thread *t); diff --git a/lib/ringbuf.c b/lib/ringbuf.c index 26c4e744b4..49221e7cb3 100644 --- a/lib/ringbuf.c +++ b/lib/ringbuf.c @@ -22,7 +22,7 @@ #include "ringbuf.h" #include "memory.h" -DEFINE_MTYPE_STATIC(LIB, RINGBUFFER, "Ring buffer") +DEFINE_MTYPE_STATIC(LIB, RINGBUFFER, "Ring buffer"); struct ringbuf *ringbuf_new(size_t size) { diff --git a/lib/routemap.c b/lib/routemap.c index 7714086672..05f82e34cf 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -33,14 +33,14 @@ #include "lib_errors.h" #include "table.h" -DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map") -DEFINE_MTYPE(LIB, ROUTE_MAP_NAME, "Route map name") -DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_INDEX, "Route map index") -DEFINE_MTYPE(LIB, ROUTE_MAP_RULE, "Route map rule") -DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_RULE_STR, "Route map rule str") -DEFINE_MTYPE(LIB, ROUTE_MAP_COMPILED, "Route map compiled") -DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_DEP, "Route map dependency") -DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_DEP_DATA, "Route map dependency data") +DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map"); +DEFINE_MTYPE(LIB, ROUTE_MAP_NAME, "Route map name"); +DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_INDEX, "Route map index"); +DEFINE_MTYPE(LIB, ROUTE_MAP_RULE, "Route map rule"); +DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_RULE_STR, "Route map rule str"); +DEFINE_MTYPE(LIB, ROUTE_MAP_COMPILED, "Route map compiled"); +DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_DEP, "Route map dependency"); +DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP_DEP_DATA, "Route map dependency data"); DEFINE_QOBJ_TYPE(route_map_index) DEFINE_QOBJ_TYPE(route_map) diff --git a/lib/routemap.h b/lib/routemap.h index 3e208c8cb5..2d5d3a1f90 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -32,9 +32,9 @@ extern "C" { #endif -DECLARE_MTYPE(ROUTE_MAP_NAME) -DECLARE_MTYPE(ROUTE_MAP_RULE) -DECLARE_MTYPE(ROUTE_MAP_COMPILED) +DECLARE_MTYPE(ROUTE_MAP_NAME); +DECLARE_MTYPE(ROUTE_MAP_RULE); +DECLARE_MTYPE(ROUTE_MAP_COMPILED); /* Route map's type. */ enum route_map_type { RMAP_PERMIT, RMAP_DENY, RMAP_ANY }; diff --git a/lib/skiplist.c b/lib/skiplist.c index b79dfa6772..fc42857418 100644 --- a/lib/skiplist.c +++ b/lib/skiplist.c @@ -63,8 +63,8 @@ #include "lib_errors.h" #include "network.h" -DEFINE_MTYPE_STATIC(LIB, SKIP_LIST, "Skip List") -DEFINE_MTYPE_STATIC(LIB, SKIP_LIST_NODE, "Skip Node") +DEFINE_MTYPE_STATIC(LIB, SKIP_LIST, "Skip List"); +DEFINE_MTYPE_STATIC(LIB, SKIP_LIST_NODE, "Skip Node"); #define BitsInRandom 31 diff --git a/lib/sockunion.c b/lib/sockunion.c index c701da1e03..d65235b41c 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -29,7 +29,7 @@ #include "lib_errors.h" #include "printfrr.h" -DEFINE_MTYPE_STATIC(LIB, SOCKUNION, "Socket union") +DEFINE_MTYPE_STATIC(LIB, SOCKUNION, "Socket union"); const char *inet_sutop(const union sockunion *su, char *str) { diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index ac6dd29f06..a273e93463 100644 --- a/lib/spf_backoff.c +++ b/lib/spf_backoff.c @@ -33,8 +33,8 @@ #include "thread.h" #include "vty.h" -DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF, "SPF backoff") -DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF_NAME, "SPF backoff name") +DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF, "SPF backoff"); +DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF_NAME, "SPF backoff name"); static bool debug_spf_backoff = false; #define backoff_debug(...) \ diff --git a/lib/srcdest_table.c b/lib/srcdest_table.c index ef82b7ac01..a115507192 100644 --- a/lib/srcdest_table.c +++ b/lib/srcdest_table.c @@ -30,7 +30,7 @@ #include "table.h" #include "printfrr.h" -DEFINE_MTYPE_STATIC(LIB, ROUTE_SRC_NODE, "Route source node") +DEFINE_MTYPE_STATIC(LIB, ROUTE_SRC_NODE, "Route source node"); /* ----- functions to manage rnodes _with_ srcdest table ----- */ struct srcdest_rnode { diff --git a/lib/stream.c b/lib/stream.c index ef73c2fdc9..904ee73b10 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -31,8 +31,8 @@ #include "frr_pthread.h" #include "lib_errors.h" -DEFINE_MTYPE_STATIC(LIB, STREAM, "Stream") -DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO") +DEFINE_MTYPE_STATIC(LIB, STREAM, "Stream"); +DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO"); /* Tests whether a position is valid */ #define GETP_VALID(S, G) ((G) <= (S)->endp) diff --git a/lib/table.c b/lib/table.c index 89e32182b5..3153815680 100644 --- a/lib/table.c +++ b/lib/table.c @@ -29,8 +29,8 @@ #include "sockunion.h" #include "libfrr_trace.h" -DEFINE_MTYPE_STATIC(LIB, ROUTE_TABLE, "Route table") -DEFINE_MTYPE(LIB, ROUTE_NODE, "Route node") +DEFINE_MTYPE_STATIC(LIB, ROUTE_TABLE, "Route table"); +DEFINE_MTYPE(LIB, ROUTE_NODE, "Route node"); static void route_table_free(struct route_table *); diff --git a/lib/table.h b/lib/table.h index 5d620d332b..ba922424fe 100644 --- a/lib/table.h +++ b/lib/table.h @@ -31,7 +31,7 @@ extern "C" { #endif -DECLARE_MTYPE(ROUTE_NODE) +DECLARE_MTYPE(ROUTE_NODE); /* * Forward declarations. diff --git a/lib/termtable.c b/lib/termtable.c index b22a1ad387..ddf8822853 100644 --- a/lib/termtable.c +++ b/lib/termtable.c @@ -24,7 +24,7 @@ #include "memory.h" #include "termtable.h" -DEFINE_MTYPE_STATIC(LIB, TTABLE, "ASCII table") +DEFINE_MTYPE_STATIC(LIB, TTABLE, "ASCII table"); /* clang-format off */ const struct ttable_style ttable_styles[] = { diff --git a/lib/thread.c b/lib/thread.c index af01c75a44..e5826c5e54 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -38,10 +38,10 @@ #include "libfrr_trace.h" #include "libfrr.h" -DEFINE_MTYPE_STATIC(LIB, THREAD, "Thread") -DEFINE_MTYPE_STATIC(LIB, THREAD_MASTER, "Thread master") -DEFINE_MTYPE_STATIC(LIB, THREAD_POLL, "Thread Poll Info") -DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats") +DEFINE_MTYPE_STATIC(LIB, THREAD, "Thread"); +DEFINE_MTYPE_STATIC(LIB, THREAD_MASTER, "Thread master"); +DEFINE_MTYPE_STATIC(LIB, THREAD_POLL, "Thread Poll Info"); +DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats"); DECLARE_LIST(thread_list, struct thread, threaditem) diff --git a/lib/typesafe.c b/lib/typesafe.c index 69796e2d81..76705fad0d 100644 --- a/lib/typesafe.c +++ b/lib/typesafe.c @@ -25,9 +25,9 @@ #include "memory.h" #include "network.h" -DEFINE_MTYPE_STATIC(LIB, TYPEDHASH_BUCKET, "Typed-hash bucket") -DEFINE_MTYPE_STATIC(LIB, SKIPLIST_OFLOW, "Skiplist overflow") -DEFINE_MTYPE_STATIC(LIB, HEAP_ARRAY, "Typed-heap array") +DEFINE_MTYPE_STATIC(LIB, TYPEDHASH_BUCKET, "Typed-hash bucket"); +DEFINE_MTYPE_STATIC(LIB, SKIPLIST_OFLOW, "Skiplist overflow"); +DEFINE_MTYPE_STATIC(LIB, HEAP_ARRAY, "Typed-heap array"); #if 0 static void hash_consistency_check(struct thash_head *head) diff --git a/lib/vector.c b/lib/vector.c index 0631e836f6..565c49fd59 100644 --- a/lib/vector.c +++ b/lib/vector.c @@ -23,8 +23,8 @@ #include "vector.h" #include "memory.h" -DEFINE_MTYPE_STATIC(LIB, VECTOR, "Vector") -DEFINE_MTYPE_STATIC(LIB, VECTOR_INDEX, "Vector index") +DEFINE_MTYPE_STATIC(LIB, VECTOR, "Vector"); +DEFINE_MTYPE_STATIC(LIB, VECTOR_INDEX, "Vector index"); /* Initialize vector : allocate memory and return vector. */ vector vector_init(unsigned int size) @@ -42,8 +42,8 @@ /* default VRF name value used when VRF backend is not NETNS */ #define VRF_DEFAULT_NAME_INTERNAL "default" -DEFINE_MTYPE_STATIC(LIB, VRF, "VRF") -DEFINE_MTYPE_STATIC(LIB, VRF_BITMAP, "VRF bit-map") +DEFINE_MTYPE_STATIC(LIB, VRF, "VRF"); +DEFINE_MTYPE_STATIC(LIB, VRF_BITMAP, "VRF bit-map"); DEFINE_QOBJ_TYPE(vrf) @@ -56,9 +56,9 @@ #include "lib/vty_clippy.c" #endif -DEFINE_MTYPE_STATIC(LIB, VTY, "VTY") -DEFINE_MTYPE_STATIC(LIB, VTY_OUT_BUF, "VTY output buffer") -DEFINE_MTYPE_STATIC(LIB, VTY_HIST, "VTY history") +DEFINE_MTYPE_STATIC(LIB, VTY, "VTY"); +DEFINE_MTYPE_STATIC(LIB, VTY_OUT_BUF, "VTY output buffer"); +DEFINE_MTYPE_STATIC(LIB, VTY_HIST, "VTY history"); /* Vty events */ enum event { diff --git a/lib/wheel.c b/lib/wheel.c index 5bdd6292f9..1a0469b256 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -24,8 +24,8 @@ #include "wheel.h" #include "log.h" -DEFINE_MTYPE_STATIC(LIB, TIMER_WHEEL, "Timer Wheel") -DEFINE_MTYPE_STATIC(LIB, TIMER_WHEEL_LIST, "Timer Wheel Slot List") +DEFINE_MTYPE_STATIC(LIB, TIMER_WHEEL, "Timer Wheel"); +DEFINE_MTYPE_STATIC(LIB, TIMER_WHEEL_LIST, "Timer Wheel Slot List"); static int debug_timer_wheel = 0; diff --git a/lib/workqueue.c b/lib/workqueue.c index 8eabdf52e7..2a8326c056 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -28,9 +28,9 @@ #include "command.h" #include "log.h" -DEFINE_MTYPE(LIB, WORK_QUEUE, "Work queue") -DEFINE_MTYPE_STATIC(LIB, WORK_QUEUE_ITEM, "Work queue item") -DEFINE_MTYPE_STATIC(LIB, WORK_QUEUE_NAME, "Work queue name string") +DEFINE_MTYPE(LIB, WORK_QUEUE, "Work queue"); +DEFINE_MTYPE_STATIC(LIB, WORK_QUEUE_ITEM, "Work queue item"); +DEFINE_MTYPE_STATIC(LIB, WORK_QUEUE_NAME, "Work queue name string"); /* master list of work_queues */ static struct list _work_queues; diff --git a/lib/workqueue.h b/lib/workqueue.h index 7c610f5dd6..b076ed0d28 100644 --- a/lib/workqueue.h +++ b/lib/workqueue.h @@ -30,7 +30,7 @@ extern "C" { #endif -DECLARE_MTYPE(WORK_QUEUE) +DECLARE_MTYPE(WORK_QUEUE); /* Hold time for the initial schedule of a queue run, in millisec */ #define WORK_QUEUE_DEFAULT_HOLD 50 diff --git a/lib/yang.c b/lib/yang.c index 383dc9f5eb..df3b07fb09 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -27,8 +27,8 @@ #include <libyang/user_types.h> -DEFINE_MTYPE_STATIC(LIB, YANG_MODULE, "YANG module") -DEFINE_MTYPE_STATIC(LIB, YANG_DATA, "YANG data structure") +DEFINE_MTYPE_STATIC(LIB, YANG_MODULE, "YANG module"); +DEFINE_MTYPE_STATIC(LIB, YANG_DATA, "YANG data structure"); /* libyang container. */ struct ly_ctx *ly_native_ctx; diff --git a/lib/yang_translator.c b/lib/yang_translator.c index 1f64675d6a..5b1d96f24c 100644 --- a/lib/yang_translator.c +++ b/lib/yang_translator.c @@ -26,9 +26,9 @@ #include "yang_translator.h" #include "frrstr.h" -DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR, "YANG Translator") -DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR_MODULE, "YANG Translator Module") -DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR_MAPPING, "YANG Translator Mapping") +DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR, "YANG Translator"); +DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR_MODULE, "YANG Translator Module"); +DEFINE_MTYPE_STATIC(LIB, YANG_TRANSLATOR_MAPPING, "YANG Translator Mapping"); /* Generate the yang_translators tree. */ static inline int yang_translator_compare(const struct yang_translator *a, diff --git a/lib/zclient.c b/lib/zclient.c index c5e844933c..c78937c1ec 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -42,8 +42,8 @@ #include "srte.h" #include "printfrr.h" -DEFINE_MTYPE_STATIC(LIB, ZCLIENT, "Zclient") -DEFINE_MTYPE_STATIC(LIB, REDIST_INST, "Redistribution instance IDs") +DEFINE_MTYPE_STATIC(LIB, ZCLIENT, "Zclient"); +DEFINE_MTYPE_STATIC(LIB, REDIST_INST, "Redistribution instance IDs"); /* Zebra client events. */ enum event { ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT }; diff --git a/lib/zlog.c b/lib/zlog.c index 51509e24f4..ca7f8da2ef 100644 --- a/lib/zlog.c +++ b/lib/zlog.c @@ -54,8 +54,8 @@ #include "zlog.h" #include "libfrr_trace.h" -DEFINE_MTYPE_STATIC(LIB, LOG_MESSAGE, "log message") -DEFINE_MTYPE_STATIC(LIB, LOG_TLSBUF, "log thread-local buffer") +DEFINE_MTYPE_STATIC(LIB, LOG_MESSAGE, "log message"); +DEFINE_MTYPE_STATIC(LIB, LOG_TLSBUF, "log thread-local buffer"); DEFINE_HOOK(zlog_init, (const char *progname, const char *protoname, unsigned short instance, uid_t uid, gid_t gid), diff --git a/lib/zlog_targets.c b/lib/zlog_targets.c index 8f4c2a46a8..f258a8fbbd 100644 --- a/lib/zlog_targets.c +++ b/lib/zlog_targets.c @@ -31,13 +31,13 @@ * absolute end. */ -DECLARE_MGROUP(LOG) -DEFINE_MGROUP_ACTIVEATEXIT(LOG, "logging subsystem") +DECLARE_MGROUP(LOG); +DEFINE_MGROUP_ACTIVEATEXIT(LOG, "logging subsystem"); -DEFINE_MTYPE_STATIC(LOG, LOG_FD, "log file target") -DEFINE_MTYPE_STATIC(LOG, LOG_FD_NAME, "log file name") -DEFINE_MTYPE_STATIC(LOG, LOG_FD_ROTATE, "log file rotate helper") -DEFINE_MTYPE_STATIC(LOG, LOG_SYSL, "syslog target") +DEFINE_MTYPE_STATIC(LOG, LOG_FD, "log file target"); +DEFINE_MTYPE_STATIC(LOG, LOG_FD_NAME, "log file name"); +DEFINE_MTYPE_STATIC(LOG, LOG_FD_ROTATE, "log file rotate helper"); +DEFINE_MTYPE_STATIC(LOG, LOG_SYSL, "syslog target"); struct zlt_fd { struct zlog_target zt; |
