diff options
| author | sri-mohan1 <sri.mohan@samsung.com> | 2023-05-08 15:28:50 +0530 |
|---|---|---|
| committer | sri-mohan1 <sri.mohan@samsung.com> | 2023-05-08 15:28:50 +0530 |
| commit | 0352223846b30353653575a0743fd07fbfaeebd5 (patch) | |
| tree | 39c5b345c6b272b430ef2ea2d702b0a3889f6d0d /ldpd/interface.c | |
| parent | e75e1553fa777d7aa90d6a48b5e4d8626fe40862 (diff) | |
ldpd: 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 'ldpd/interface.c')
| -rw-r--r-- | ldpd/interface.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c index ad5d853b65..f0e70cbacc 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -138,14 +138,13 @@ void if_update_info(struct iface *iface, struct kif *kif) { /* get type */ - if (kif->flags & IFF_POINTOPOINT) + if (CHECK_FLAG(kif->flags, IFF_POINTOPOINT)) iface->type = IF_TYPE_POINTOPOINT; - if (kif->flags & IFF_BROADCAST && - kif->flags & IFF_MULTICAST) + if (CHECK_FLAG(kif->flags, IFF_BROADCAST) && + CHECK_FLAG(kif->flags, IFF_MULTICAST)) iface->type = IF_TYPE_BROADCAST; - if (ldpd_process == PROC_LDP_ENGINE && iface->operative && - !kif->operative) + if (ldpd_process == PROC_LDP_ENGINE && iface->operative && !kif->operative) ldp_sync_fsm(iface, LDP_SYNC_EVT_IFACE_SHUTDOWN); /* get index and flags */ @@ -276,8 +275,7 @@ if_start(struct iface *iface, int af) struct iface_af *ia; struct timeval now; - log_debug("%s: %s address-family %s", __func__, iface->name, - af_name(af)); + log_debug("%s: %s address-family %s", __func__, iface->name, af_name(af)); ia = iface_af_get(iface, af); @@ -560,8 +558,7 @@ if_join_ipv4_group(struct iface *iface, struct in_addr *addr) { struct in_addr if_addr; - log_debug("%s: interface %s addr %pI4", __func__, iface->name, - addr); + log_debug("%s: interface %s addr %pI4", __func__, iface->name, addr); if_addr.s_addr = if_get_ipv4_addr(iface); @@ -579,8 +576,7 @@ if_leave_ipv4_group(struct iface *iface, struct in_addr *addr) { struct in_addr if_addr; - log_debug("%s: interface %s addr %pI4", __func__, iface->name, - addr); + log_debug("%s: interface %s addr %pI4", __func__, iface->name, addr); if_addr.s_addr = if_get_ipv4_addr(iface); |
