summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_peer.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-10-10 23:15:32 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2023-10-12 20:23:18 +0200
commit7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch)
tree16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /nhrpd/nhrp_peer.c
parentMerge pull request #14559 from opensourcerouting/feature/update_dev_versions_... (diff)
downloadfrr-7d67b9ff28d09de58c632f80ef7d330e45e698f6.tar.xz
frr-7d67b9ff28d09de58c632f80ef7d330e45e698f6.zip
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 'nhrpd/nhrp_peer.c')
-rw-r--r--nhrpd/nhrp_peer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index ffb6cf750..9926dcaf5 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -139,7 +139,7 @@ static void nhrp_peer_ifp_notify(struct notifier_block *n, unsigned long cmd)
nhrp_peer_vc_notify);
__nhrp_peer_check(p);
}
- /* fallthru */ /* to post config update */
+ fallthrough; /* to post config update */
case NOTIFY_INTERFACE_ADDRESS_CHANGED:
notifier_call(&p->notifier_list, NOTIFY_PEER_IFCONFIG_CHANGED);
break;
@@ -1050,7 +1050,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p,
* append our selves to the transit NHS list
*/
goto err;
- /* fallthru */
+ fallthrough;
case NHRP_EXTENSION_RESPONDER_ADDRESS:
/* Supported compulsory extensions, and any
* non-compulsory that is not explicitly handled,
@@ -1220,7 +1220,7 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
/* FIXME: send error-indication */
}
}
- /* fallthru */ /* FIXME: double check, is this correct? */
+ fallthrough; /* FIXME: double check, is this correct? */
case NHRP_ROUTE_OFF_NBMA:
if (packet_types[hdr->type].handler) {
packet_types[hdr->type].handler(&pp);