summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-03-22 10:00:34 +0100
committerGitHub <noreply@github.com>2021-03-22 10:00:34 +0100
commit37916b2b113af12d86208b9abdd594647421d65c (patch)
treeffc76feaddd010df2bfdf653a610bcc1929ca98a /nhrpd
parentMerge pull request #8297 from adrianomarto/msdp-dscp-cs6 (diff)
parentlib: temporary workaround for LabN CI (diff)
downloadfrr-37916b2b113af12d86208b9abdd594647421d65c.tar.xz
frr-37916b2b113af12d86208b9abdd594647421d65c.zip
Merge pull request #8121 from opensourcerouting/macro-cleanup
*: require ISO C11 + semicolons after file-scope macros
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/debug.h18
-rw-r--r--nhrpd/nhrp_cache.c4
-rw-r--r--nhrpd/nhrp_interface.c2
-rw-r--r--nhrpd/nhrp_main.c5
-rw-r--r--nhrpd/nhrp_nhs.c4
-rw-r--r--nhrpd/nhrp_peer.c2
-rw-r--r--nhrpd/nhrp_route.c2
-rw-r--r--nhrpd/nhrp_shortcut.c2
-rw-r--r--nhrpd/nhrp_vc.c2
-rw-r--r--nhrpd/nhrpd.h2
-rw-r--r--nhrpd/zbuf.c2
11 files changed, 14 insertions, 31 deletions
diff --git a/nhrpd/debug.h b/nhrpd/debug.h
index db4bac791..e9428fa90 100644
--- a/nhrpd/debug.h
+++ b/nhrpd/debug.h
@@ -18,26 +18,8 @@
extern unsigned int debug_flags;
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-
#define debugf(level, ...) \
do { \
if (unlikely(debug_flags & level)) \
zlog_debug(__VA_ARGS__); \
} while (0)
-
-#elif defined __GNUC__
-
-#define debugf(level, _args...) \
- do { \
- if (unlikely(debug_flags & level)) \
- zlog_debug(_args); \
- } while (0)
-
-#else
-
-static inline void debugf(int level, const char *format, ...)
-{
-}
-
-#endif
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c
index cb298b1a0..4de8e220c 100644
--- a/nhrpd/nhrp_cache.c
+++ b/nhrpd/nhrp_cache.c
@@ -15,8 +15,8 @@
#include "netlink.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_CACHE, "NHRP cache entry")
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_CACHE_CONFIG, "NHRP cache config entry")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_CACHE, "NHRP cache entry");
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_CACHE_CONFIG, "NHRP cache config entry");
unsigned long nhrp_cache_counts[NHRP_CACHE_NUM_TYPES];
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c
index b348cc0de..a64708d88 100644
--- a/nhrpd/nhrp_interface.c
+++ b/nhrpd/nhrp_interface.c
@@ -21,7 +21,7 @@
#include "os.h"
#include "netlink.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_IF, "NHRP interface")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_IF, "NHRP interface");
static void nhrp_interface_update_cache_config(struct interface *ifp,
bool available,
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c
index 49a4900bf..5c819017f 100644
--- a/nhrpd/nhrp_main.c
+++ b/nhrpd/nhrp_main.c
@@ -29,7 +29,7 @@
#include "netlink.h"
#include "nhrp_errors.h"
-DEFINE_MGROUP(NHRPD, "NHRP")
+DEFINE_MGROUP(NHRPD, "NHRP");
unsigned int debug_flags = 0;
@@ -128,7 +128,8 @@ FRR_DAEMON_INFO(nhrpd, NHRP, .vty_port = NHRP_VTY_PORT,
.signals = sighandlers, .n_signals = array_size(sighandlers),
.privs = &nhrpd_privs, .yang_modules = nhrpd_yang_modules,
- .n_yang_modules = array_size(nhrpd_yang_modules), )
+ .n_yang_modules = array_size(nhrpd_yang_modules),
+);
int main(int argc, char **argv)
{
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index ae5737d73..1689facbc 100644
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -14,8 +14,8 @@
#include "nhrpd.h"
#include "nhrp_protocol.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_NHS, "NHRP next hop server")
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_REGISTRATION, "NHRP registration entries")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_NHS, "NHRP next hop server");
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_REGISTRATION, "NHRP registration entries");
static int nhrp_nhs_resolve(struct thread *t);
static int nhrp_reg_send_req(struct thread *t);
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index 0d589e305..af352c68e 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -22,7 +22,7 @@
#include "nhrp_protocol.h"
#include "os.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_PEER, "NHRP peer entry")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_PEER, "NHRP peer entry");
struct ipv6hdr {
uint8_t priority_version;
diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c
index 737772dbc..7a4c57b5d 100644
--- a/nhrpd/nhrp_route.c
+++ b/nhrpd/nhrp_route.c
@@ -18,7 +18,7 @@
#include "log.h"
#include "zclient.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_ROUTE, "NHRP routing entry")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_ROUTE, "NHRP routing entry");
static struct zclient *zclient;
static struct route_table *zebra_rib[AFI_MAX];
diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c
index ef3be82ca..8ce19cd4a 100644
--- a/nhrpd/nhrp_shortcut.c
+++ b/nhrpd/nhrp_shortcut.c
@@ -18,7 +18,7 @@
#include "log.h"
#include "nhrp_protocol.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_SHORTCUT, "NHRP shortcut")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_SHORTCUT, "NHRP shortcut");
static struct route_table *shortcut_rib[AFI_MAX];
diff --git a/nhrpd/nhrp_vc.c b/nhrpd/nhrp_vc.c
index d538163e9..b3b657f3f 100644
--- a/nhrpd/nhrp_vc.c
+++ b/nhrpd/nhrp_vc.c
@@ -17,7 +17,7 @@
#include "nhrpd.h"
#include "os.h"
-DEFINE_MTYPE_STATIC(NHRPD, NHRP_VC, "NHRP virtual connection")
+DEFINE_MTYPE_STATIC(NHRPD, NHRP_VC, "NHRP virtual connection");
struct child_sa {
uint32_t id;
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index 365546315..9c8c293b9 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -18,7 +18,7 @@
#include "memory.h"
#include "resolver.h"
-DECLARE_MGROUP(NHRPD)
+DECLARE_MGROUP(NHRPD);
#define NHRPD_DEFAULT_HOLDTIME 7200
diff --git a/nhrpd/zbuf.c b/nhrpd/zbuf.c
index 7f1475cc6..a78d827ea 100644
--- a/nhrpd/zbuf.c
+++ b/nhrpd/zbuf.c
@@ -21,7 +21,7 @@
#define ERRNO_IO_RETRY(EN) (((EN) == EAGAIN) || ((EN) == EWOULDBLOCK) || ((EN) == EINTR))
-DEFINE_MTYPE_STATIC(NHRPD, ZBUF_DATA, "NHRPD zbuf data")
+DEFINE_MTYPE_STATIC(NHRPD, ZBUF_DATA, "NHRPD zbuf data");
struct zbuf *zbuf_alloc(size_t size)
{