]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
fix fallthrough warnings
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Jun 2023 23:32:22 +0000 (16:32 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Jun 2023 23:32:22 +0000 (16:32 -0700)
In lib/utils.c comment for fallthrough was in wrong place
and one was missing in xfrm_state.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/xfrm_state.c
lib/utils.c

index a7b3d0e1415668d3cab47946df3b4be7f221dafb..9be65b2f8461b23be2076db229b6c0050137bfcf 100644 (file)
@@ -660,6 +660,7 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
                case XFRM_MODE_BEET:
                        if (req.xsinfo.id.proto == IPPROTO_ESP)
                                break;
+                       /* fallthrough */
                default:
                        fprintf(stderr, "MODE value is invalid with XFRM-PROTO value \"%s\"\n",
                                strxf_xfrmproto(req.xsinfo.id.proto));
index 01f3a5f7e4ea59c8b9228fdb02a6a2a8d3b62c14..b1f273054906b468a681cf7f4a776af5f07f0571 100644 (file)
@@ -985,9 +985,8 @@ const char *rt_addr_n2a_r(int af, int len,
                        return inet_ntop(AF_INET6, &sa->sin6.sin6_addr,
                                         buf, buflen);
                }
-
-               /* fallthrough */
        }
+               /* fallthrough */
        default:
                return "???";
        }