diff options
author | sri-mohan1 <sri.mohan@samsung.com> | 2024-03-25 04:54:52 +0100 |
---|---|---|
committer | sri-mohan1 <sri.mohan@samsung.com> | 2024-03-26 05:51:45 +0100 |
commit | 2df51c7fe3d35ff3ac2993487890daa0b189e4f1 (patch) | |
tree | 8a9736a5fec644f83c53cc12b860692fb13357dc /zebra/zebra_netns_id.c | |
parent | zebra: changes for code maintainability (diff) | |
download | frr-2df51c7fe3d35ff3ac2993487890daa0b189e4f1.tar.xz frr-2df51c7fe3d35ff3ac2993487890daa0b189e4f1.zip |
zebra: 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 'zebra/zebra_netns_id.c')
-rw-r--r-- | zebra/zebra_netns_id.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index 1af3a3e85..4cee3b89f 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -42,7 +42,7 @@ #define NETLINK_SOCKET_BUFFER_SIZE 512 #define NETLINK_ALIGNTO 4 #define NETLINK_ALIGN(len) \ - (((len) + NETLINK_ALIGNTO - 1) & ~(NETLINK_ALIGNTO - 1)) + CHECK_FLAG(((len) + NETLINK_ALIGNTO - 1), ~(NETLINK_ALIGNTO - 1)) #define NETLINK_NLATTR_LEN(_a, _b) (unsigned int)((char *)_a - (char *)_b) #endif /* defined(HAVE_NETLINK) */ @@ -66,7 +66,7 @@ static struct nlmsghdr *initiate_nlh(char *buf, unsigned int *seq, int type) nlh->nlmsg_type = type; nlh->nlmsg_flags = NLM_F_REQUEST; if (type == RTM_NEWNSID) - nlh->nlmsg_flags |= NLM_F_ACK; + SET_FLAG(nlh->nlmsg_flags, NLM_F_ACK); nlh->nlmsg_seq = *seq = frr_sequence32_next(); return nlh; } |