diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-09 13:21:56 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-09 13:21:56 +0100 |
commit | 95f7965d09a6eb4447c0de5a679114492cac3f37 (patch) | |
tree | 1bfa78792b4f62934a483104e921f0bff5809590 /ospf6d | |
parent | tools: Add coccinelle script to remove parenthesis on return (diff) | |
download | frr-95f7965d09a6eb4447c0de5a679114492cac3f37.tar.xz frr-95f7965d09a6eb4447c0de5a679114492cac3f37.zip |
*: Remove parenthesis on return for constants
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_area.c | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_intra.c | 14 | ||||
-rw-r--r-- | ospf6d/ospf6_route.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 484e5adae..e4c4d4ad9 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -157,7 +157,7 @@ static int ospf6_area_stub_set(struct ospf6 *ospf6, struct ospf6_area *area) ospf6_area_stub_update(area); } - return (1); + return 1; } static void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area) diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 0fde997a2..61879b2cb 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -172,13 +172,13 @@ int ospf6_router_is_stub_router(struct ospf6_lsa *lsa) + sizeof(struct ospf6_lsa_header)); if (!OSPF6_OPT_ISSET(rtr_lsa->options, OSPF6_OPT_R)) { - return (OSPF6_IS_STUB_ROUTER); + return OSPF6_IS_STUB_ROUTER; } else if (!OSPF6_OPT_ISSET(rtr_lsa->options, OSPF6_OPT_V6)) { - return (OSPF6_IS_STUB_ROUTER_V6); + return OSPF6_IS_STUB_ROUTER_V6; } } - return (OSPF6_NOT_STUB_ROUTER); + return OSPF6_NOT_STUB_ROUTER; } int ospf6_router_lsa_originate(struct thread *thread) @@ -596,7 +596,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf, prefixnum = ntohl(link_lsa->prefix_num); if (pos > prefixnum) - return (NULL); + return NULL; start = (char *)link_lsa + sizeof(struct ospf6_link_lsa); end = (char *)lsa->header + ntohs(lsa->header->length); @@ -606,7 +606,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf, prefix = (struct ospf6_prefix *)current; if (prefix->prefix_length == 0 || current + OSPF6_PREFIX_SIZE(prefix) > end) { - return (NULL); + return NULL; } if (cnt < pos) { @@ -623,7 +623,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf, } } while (current <= end); } - return (NULL); + return NULL; } static int ospf6_link_lsa_show(struct vty *vty, struct ospf6_lsa *lsa) @@ -797,7 +797,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa, prefixnum = ntohs(intra_prefix_lsa->prefix_num); if (pos > prefixnum) - return (NULL); + return NULL; start = (char *)intra_prefix_lsa + sizeof(struct ospf6_intra_prefix_lsa); diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 28b15769d..723746c47 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -336,7 +336,7 @@ int ospf6_route_get_first_nh_index(struct ospf6_route *route) return nh->ifindex; } - return (-1); + return -1; } int ospf6_nexthop_cmp(struct ospf6_nexthop *a, struct ospf6_nexthop *b) |