summaryrefslogtreecommitdiffstats
path: root/babeld/babeld.c
diff options
context:
space:
mode:
authorsri-mohan1 <sri.mohan@samsung.com>2024-09-06 03:32:51 +0200
committersri-mohan1 <sri.mohan@samsung.com>2024-09-06 03:32:51 +0200
commit53819c298b663af926fdad8d3a816b4bb937417f (patch)
treec1f7acfe08fa3eef96b613917750771fe855318b /babeld/babeld.c
parentMerge pull request #16751 from opensourcerouting/fix/solo_peer-group (diff)
downloadfrr-53819c298b663af926fdad8d3a816b4bb937417f.tar.xz
frr-53819c298b663af926fdad8d3a816b4bb937417f.zip
babeld: changes for code maintainability
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
Diffstat (limited to 'babeld/babeld.c')
-rw-r--r--babeld/babeld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 73deb1dd9..b562f0b70 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -204,7 +204,7 @@ static void babel_read_protocol(struct event *thread)
making these inits have sense. */
static void babel_init_routing_process(struct event *thread)
{
- myseqno = (frr_weak_random() & 0xFFFF);
+ myseqno = CHECK_FLAG(frr_weak_random(), 0xFFFF);
babel_get_myid();
babel_load_state_file();
debugf(BABEL_DEBUG_COMMON, "My ID is : %s.", format_eui64(myid));
@@ -443,8 +443,8 @@ babel_fill_with_next_timeout(struct timeval *tv)
#if (defined NO_DEBUG)
#define printIfMin(a,b,c,d)
#else
-#define printIfMin(a, b, c, d) \
- if (unlikely(debug & BABEL_DEBUG_TIMEOUT)) { \
+#define printIfMin(a, b, c, d) \
+ if (unlikely(CHECK_FLAG(debug, BABEL_DEBUG_TIMEOUT))) { \
printIfMin(a, b, c, d); \
}