summaryrefslogtreecommitdiff
path: root/bfdd/bfd_packet.c
diff options
context:
space:
mode:
authorsri-mohan1 <sri.mohan@samsung.com>2024-07-16 15:23:52 +0530
committersri-mohan1 <sri.mohan@samsung.com>2024-07-16 15:30:41 +0530
commitd9e51c6399a655acd408224f044acd62765bcefe (patch)
treedc6e5fa0d730406560ea6ab75523bdf36b55e2e7 /bfdd/bfd_packet.c
parent74e720c99f80a79ab5dde8b04a1559319149a74b (diff)
bfdd: 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 'bfdd/bfd_packet.c')
-rw-r--r--bfdd/bfd_packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c
index 8110f434c2..f9397fa128 100644
--- a/bfdd/bfd_packet.c
+++ b/bfdd/bfd_packet.c
@@ -982,7 +982,7 @@ void bfd_recv_cb(struct event *t)
}
/* Save remote diagnostics before state switch. */
- bfd->remote_diag = cp->diag & BFD_DIAGMASK;
+ bfd->remote_diag = CHECK_FLAG(cp->diag, BFD_DIAGMASK);
/* Update remote timers settings. */
bfd->remote_timers.desired_min_tx = ntohl(cp->timers.desired_min_tx);
@@ -1738,7 +1738,7 @@ void bfd_peer_mac_set(int sd, struct bfd_session *bfd,
if (CHECK_FLAG(bfd->flags, BFD_SESS_FLAG_MAC_SET))
return;
- if (ifp->flags & IFF_NOARP)
+ if (CHECK_FLAG(ifp->flags, IFF_NOARP))
return;
if (peer->sa_sin.sin_family == AF_INET) {