summaryrefslogtreecommitdiff
path: root/lib/nexthop.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-10-11 00:15:32 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2023-10-12 21:23:18 +0300
commit7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch)
tree16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /lib/nexthop.c
parent9bc4d9eaec92589deda092bd867054e25e64be3f (diff)
build: add -Wimplicit-fallthrough
Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/nexthop.c')
-rw-r--r--lib/nexthop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index 8df57e36a2..4ddb53cd96 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -173,7 +173,7 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
ret = _nexthop_gateway_cmp(next1, next2);
if (ret != 0)
return ret;
- /* Intentional Fall-Through */
+ fallthrough;
case NEXTHOP_TYPE_IFINDEX:
if (next1->ifindex < next2->ifindex)
return -1;
@@ -295,7 +295,7 @@ int nexthop_cmp_basic(const struct nexthop *nh1,
ret = nexthop_g_addr_cmp(nh1->type, &nh1->gate, &nh2->gate);
if (ret != 0)
return ret;
- /* Intentional Fall-Through */
+ fallthrough;
case NEXTHOP_TYPE_IFINDEX:
if (nh1->ifindex < nh2->ifindex)
return -1;