"[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls across 2/4 ASN boundary somewhere, broken..");
hops = seg->length;
}
- /* fallthru */
+ fallthrough;
case AS_SEQUENCE:
cpasns = MIN(seg->length, hops);
hops -= seg->length;
/*
* NOTE: intentional fall through
* - for consistency in rx processing
- *
- * The following comment is to signal GCC this intention
- * and suppress the warning
*/
- /* FALLTHRU */
+ fallthrough;
case BGP_ATTR_NHLEN_IPV4:
stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN);
/* Probably needed for RFC 2283 */
XFREE(MTYPE_COMMUNITY_LIST_CONFIG, entry->config);
if (entry->reg)
bgp_regex_free(entry->reg);
+ break;
default:
break;
}
EVENT_OFF(peer->connection->t_pmax_restart);
EVENT_OFF(peer->t_refresh_stalepath);
- /* fallthru */
+ fallthrough;
case Clearing:
EVENT_OFF(connection->t_start);
EVENT_OFF(connection->t_connect);
&& (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED
|| peer->bgp->fast_convergence))
BGP_EVENT_ADD(connection, TCP_fatal_error);
+ break;
case Clearing:
case Deleted:
case BGP_STATUS_MAX:
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
return -1;
}
+ break;
/* we deliberately ignore unknown codes, see below */
default:
break;
|| IN6_IS_ADDR_LINKLOCAL(&i6a))
return NB_ERR_VALIDATION;
}
- /* FALLTHROUGH */
+ return NB_OK;
case NB_EV_PREPARE:
case NB_EV_ABORT:
return NB_OK;
int bgp_option_unset(int flag)
{
switch (flag) {
- /* Fall through. */
case BGP_OPT_NO_ZEBRA:
case BGP_OPT_NO_FIB:
UNSET_FLAG(bm->options, flag);
switch (argv[idx]->text[0]) {
case 'z':
is_bgp = 0;
- /* fall thru */
+ idx += 2;
+ break;
case 'b':
idx += 2;
break;
switch (argv[1]->arg[0]) {
case 'b':
- do_export = 1; /* fall through */
+ do_export = 1;
+ do_import = 1;
+ break;
case 'i':
do_import = 1;
break;
case SHOW_NVE_SUMMARY_RESPONSES:
rfapiRibShowResponsesSummary(vty);
+ break;
case SHOW_NVE_SUMMARY_UNKNOWN_NVES:
case SHOW_NVE_SUMMARY_MAX:
AC_C_FLAG([-Wbad-function-cast])
AC_C_FLAG([-Wwrite-strings])
AC_C_FLAG([-Wundef])
+AC_C_FLAG([-Wimplicit-fallthrough])
if test "$enable_gcc_ultra_verbose" = "yes" ; then
AC_C_FLAG([-Wcast-qual])
AC_C_FLAG([-Wmissing-noreturn])
* Announcement Parameter in Capability messages sent to
* its peers".
*/
- /* FALLTHROUGH */
+ fallthrough;
default:
fatalx("send_capability: unsupported capability");
}
* parameter and process any other Capability Parameters
* in the message".
*/
- /* FALLTHROUGH */
+ fallthrough;
default:
if (!CHECK_FLAG(ntohs(tlv.type), UNKNOWN_FLAG))
send_notification_rtlvs(nbr, S_UNSSUPORTDCAP,
if (params->lib.remote_label != NO_LABEL &&
params->lib.remote_label != rt->remote_label)
return (0);
- /* FALLTHROUGH */
+ fallthrough;
case IMSG_CTL_SHOW_LIB_RCVD:
rt = imsg->data;
{
int secs;
- secs = INIT_DELAY_TMR;
- switch(nbr->idtimer_cnt) {
- default:
+ if (nbr->idtimer_cnt > 2) {
/* do not further increase the counter */
secs = MAX_DELAY_TMR;
- break;
- case 2:
- secs *= 2;
- /* FALLTHROUGH */
- case 1:
- secs *= 2;
- /* FALLTHROUGH */
- case 0:
+ } else {
+ secs = INIT_DELAY_TMR * (1 << nbr->idtimer_cnt);
nbr->idtimer_cnt++;
- break;
}
EVENT_OFF(nbr->initdelay_timer);
#endif
#include "base64.h"
+#include "compiler.h"
static const int CHARS_PER_LINE = 72;
static const char *ENCODING =
switch (state_in->step) {
while (1) {
+ fallthrough;
case step_A:
if (plainchar == plaintextend) {
state_in->result = result;
result = (fragment & 0x0fc) >> 2;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x003) << 4;
- /* fall through */
+ fallthrough;
case step_B:
if (plainchar == plaintextend) {
state_in->result = result;
result |= (fragment & 0x0f0) >> 4;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x00f) << 2;
- /* fall through */
+ fallthrough;
case step_C:
if (plainchar == plaintextend) {
state_in->result = result;
switch (state_in->step) {
while (1) {
+ fallthrough;
case step_a:
do {
if (codec == code_in+length_in) {
fragmt = base64_decode_value(*codec++);
} while (fragmt < 0);
*plainc = (fragmt & 0x03f) << 2;
- /* fall through */
+ fallthrough;
case step_b:
do {
if (codec == code_in+length_in) {
} while (fragmt < 0);
*plainc++ |= (fragmt & 0x030) >> 4;
*plainc = (fragmt & 0x00f) << 4;
- /* fall through */
+ fallthrough;
case step_c:
do {
if (codec == code_in+length_in) {
} while (fragmt < 0);
*plainc++ |= (fragmt & 0x03c) >> 2;
*plainc = (fragmt & 0x003) << 6;
- /* fall through */
+ fallthrough;
case step_d:
do {
if (codec == code_in+length_in) {
listnode_add(next, newstack);
break;
case partly_match:
- trace_matcher("trivial_match\n");
+ trace_matcher("partly_match\n");
if (exact_match_exists && !last_token)
break;
- /* fallthru */
+ fallthrough;
case exact_match:
trace_matcher("exact_match\n");
if (last_token) {
# define _RET_NONNULL , returns_nonnull
#endif
#if __has_attribute(fallthrough)
-# define _FALLTHROUGH __attribute__((fallthrough));
+# define fallthrough __attribute__((fallthrough));
#endif
# define _CONSTRUCTOR(x) constructor(x)
# define _DEPRECATED(x) deprecated(x)
# define __has_attribute(x) 0
#endif
#if __GNUC__ >= 7
-# define _FALLTHROUGH __attribute__((fallthrough));
+# define fallthrough __attribute__((fallthrough));
#endif
#endif
#ifndef _ALLOC_SIZE
# define _ALLOC_SIZE(x)
#endif
-#ifndef _FALLTHROUGH
-#define _FALLTHROUGH
+#ifndef fallthrough
+#define fallthrough
#endif
#ifndef _DEPRECATED
#define _DEPRECATED(x) deprecated
switch (len) {
case 11:
c += ((uint32_t)k[10] << 24);
- /* fallthru */
+ fallthrough;
case 10:
c += ((uint32_t)k[9] << 16);
- /* fallthru */
+ fallthrough;
case 9:
c += ((uint32_t)k[8] << 8);
- /* fallthru */
+ fallthrough;
case 8:
b += ((uint32_t)k[7] << 24);
- /* fallthru */
+ fallthrough;
case 7:
b += ((uint32_t)k[6] << 16);
- /* fallthru */
+ fallthrough;
case 6:
b += ((uint32_t)k[5] << 8);
- /* fallthru */
+ fallthrough;
case 5:
b += k[4];
- /* fallthru */
+ fallthrough;
case 4:
a += ((uint32_t)k[3] << 24);
- /* fallthru */
+ fallthrough;
case 3:
a += ((uint32_t)k[2] << 16);
- /* fallthru */
+ fallthrough;
case 2:
a += ((uint32_t)k[1] << 8);
- /* fallthru */
+ fallthrough;
case 1:
a += k[0];
}
switch (len) {
case 2:
b += k[1];
- /* fallthru */
+ fallthrough;
case 1:
a += k[0];
}
break;
case '6':
path++;
- /* fallthrough */
+ af = AF_INET6;
+ break;
default:
af = AF_INET6;
break;
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;
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;
&nexthop->gate, &nh->gate);
if (ret != 0)
continue;
- /* Intentional Fall-Through */
+ fallthrough;
case NEXTHOP_TYPE_IFINDEX:
if (nexthop->ifindex != nh->ifindex)
continue;
goto rflag;
case 'C':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'c':
error = addtype(&types,
(flags & LONGINT) ? T_WINT : T_INT);
break;
case 'D':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'd':
case 'i':
if ((error = addsarg(&types, flags)))
#endif
case 'O':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'o':
if ((error = adduarg(&types, flags)))
goto error;
break;
case 'S':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 's':
error = addtype(&types,
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
break;
case 'U':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'u':
case 'X':
case 'x':
goto rflag;
case 'C':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'c':
error = addtype(&types,
(flags & LONGINT) ? T_WINT : T_INT);
break;
case 'D':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'd':
case 'i':
if ((error = addsarg(&types, flags)))
#endif
case 'O':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'o':
if ((error = adduarg(&types, flags)))
goto error;
break;
case 'S':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 's':
error = addtype(&types,
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
break;
case 'U':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'u':
case 'X':
case 'x':
if (width >= 0)
goto rflag;
width = -width;
- /* FALLTHROUGH */
+ fallthrough;
case '-':
flags |= LADJUST;
goto rflag;
break;
case 'C':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'c':
#ifdef WCHAR_SUPPORT
if (flags & LONGINT) {
break;
case 'D':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'd':
case 'i':
if (flags & INTMAX_SIZE)
break;
case 'O':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'o':
if (flags & INTMAX_SIZE)
ujval = UJARG();
goto nosign;
case 'S':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 's':
#ifdef WCHAR_SUPPORT
if (flags & LONGINT) {
break;
case 'U':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ fallthrough;
case 'u':
if (flags & INTMAX_SIZE)
ujval = UJARG();
case 0: /* permit-or-deny */
break;
case 1: /* next */
- /* FALLTHROUGH */
case 2: /* goto */
rm_action =
yang_dnode_get_enum(args->dnode, "../action");
yang_dnode_get_ipv4(&ia, args->dnode, NULL);
if (ia.s_addr == INADDR_ANY || !ipv4_unicast_valid(&ia))
return NB_ERR_VALIDATION;
- /* FALLTHROUGH */
+ return NB_OK;
case NB_EV_PREPARE:
case NB_EV_ABORT:
return NB_OK;
yang_dnode_get_ipv6(&i6a, args->dnode, NULL);
if (!IN6_IS_ADDR_LINKLOCAL(&i6a))
return NB_ERR_VALIDATION;
- /* FALLTHROUGH */
+ return NB_OK;
case NB_EV_PREPARE:
case NB_EV_ABORT:
return NB_OK;
break;
case '\r':
vty->escape = VTY_CR;
- /* fallthru */
+ fallthrough;
case '\n':
vty_out(vty, "\n");
buffer_flush_available(vty->obuf, vty->wfd);
switch (ret) {
case WQ_QUEUE_BLOCKED: {
/* decrement item->ran again, cause this isn't an item
- * specific error, and fall through to WQ_RETRY_LATER
+ * specific error, and retry later
*/
item->ran--;
+ goto stats;
}
case WQ_RETRY_LATER: {
goto stats;
break;
}
case WQ_RETRY_NOW:
- /* a RETRY_NOW that gets here has exceeded max_tries, same as
- * ERROR */
- /* fallthru */
+ /* a RETRY_NOW that gets here has exceeded max_tries, same
+ * as ERROR
+ */
+ fallthrough;
case WQ_SUCCESS:
default: {
work_queue_item_remove(wq, item);
&next2->gate);
if (ret != 0)
return ret;
- /* Intentional Fall-Through */
+ fallthrough;
case NEXTHOP_TYPE_IFINDEX:
if (next1->ifindex < next2->ifindex)
return -1;
}
flags = O_NONBLOCK;
- /* fallthru */
+ fallthrough;
case ZLOG_5424_DST_FILE:
if (!zcf->filename)
default:
if (type & NHRP_EXTENSION_FLAG_COMPULSORY)
goto err;
- /* fallthru */
+ fallthrough;
case NHRP_EXTENSION_FORWARD_TRANSIT_NHS:
case NHRP_EXTENSION_REVERSE_TRANSIT_NHS:
/* Supported compulsory extensions, and any
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;
* 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,
/* 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);
"Neighbor state is not ExStart, ignore");
return;
}
- /* else fall through to ExStart */
- /* fallthru */
+ /* else fall through to ExStart */
+ fallthrough;
case OSPF6_NEIGHBOR_EXSTART:
/* if neighbor obeys us as our slave, schedule negotiation_done
and process LSA Headers. Otherwise, ignore this message */
on->ospf6_if->interface->vrf->name, on->name);
return;
}
- /* fall through to exchange */
-
+ /* fall through to exchange */
+ fallthrough;
case OSPF6_NEIGHBOR_EXCHANGE:
if (!memcmp(dbdesc, &on->dbdesc_last,
sizeof(struct ospf6_dbdesc))) {
"Neighbor state is not ExStart, ignore");
return;
}
- /* else fall through to ExStart */
- /* fallthru */
+ /* else fall through to ExStart */
+ fallthrough;
case OSPF6_NEIGHBOR_EXSTART:
/* If the neighbor is Master, act as Slave. Schedule
negotiation_done
case NEXTHOP_TYPE_IPV6_IFINDEX:
nexthops[i].ifindex = nh->ifindex;
- /* FALLTHROUGH */
+ fallthrough;
case NEXTHOP_TYPE_IPV6:
nexthops[i].gate.ipv6 = nh->address;
break;
case NEXTHOP_TYPE_IPV6_IFINDEX:
if (nha->ifindex != nhb->ifindex)
return false;
- /* FALLTHROUGH */
+ fallthrough;
case NEXTHOP_TYPE_IPV6:
if (!IN6_ARE_ADDR_EQUAL(&nha->address, &nhb->address))
return false;
case OSPFv3REFERENCEBANDWIDTH:
if (ospf6)
return SNMP_INTEGER(ospf6->ref_bandwidth);
- /* Otherwise, like for "not implemented". */
- /* fallthru */
+ /* Otherwise, like for "not implemented". */
+ return NULL;
case OSPFv3RESTARTSUPPORT:
case OSPFv3RESTARTINTERVAL:
case OSPFv3RESTARTSTRICTLSACHECKING:
if (IS_DEBUG_OSPF_NSSA)
zlog_debug("%s: LOCAL NSSA FLOOD of Type-7.", __func__);
- /* Fallthrough */
+ fallthrough;
default:
lsa_ack_flag = ospf_flood_through_area(lsa->area, inbr, lsa);
break;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"found back link through VL");
- /* fallthru */
+ fallthrough;
case LSA_LINK_TYPE_TRANSIT:
case LSA_LINK_TYPE_POINTOPOINT:
if (!IPV4_ADDR_SAME(&vl_data->peer_addr,
/* Incoming "oi" for this LSA has set at LSUpd
* reception. */
}
- /* Fallthrough */
+ fallthrough;
case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA:
new = ospf_opaque_lsa_install(lsa, rt_recalc);
break;
case OSPF_AS_NSSA_LSA:
new = ospf_external_lsa_install(ospf, lsa, rt_recalc);
+ break;
default: /* type-6,8,9....nothing special */
break;
}
case NSM_Down:
EVENT_OFF(nbr->t_inactivity);
EVENT_OFF(nbr->t_hello_reply);
- /* fallthru */
+ fallthrough;
case NSM_Attempt:
case NSM_Init:
case NSM_TwoWay:
/* Neighbour has a more recent LSA, we must request it
*/
ospf_ls_request_add(nbr, new);
- /* fallthru */
+ fallthrough;
case 0:
/* If we have a copy of this LSA, it's either less
* recent
through to case ExStart below. */
if (nbr->state != NSM_ExStart)
break;
- /* fallthru */
+ fallthrough;
case NSM_ExStart:
/* Initial DBD */
if ((IS_SET_DD_ALL(dd->flags) == OSPF_DD_FLAG_ALL)
case OSPF_OPAQUE_LINK_LSA:
lsa->oi = oi; /* Remember incoming interface for
flooding control. */
- /* Fallthrough */
+ fallthrough;
default:
lsa->area = oi->area;
break;
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
pbrms->family = AF_INET;
+ break;
case NEXTHOP_TYPE_IFINDEX:
case NEXTHOP_TYPE_BLACKHOLE:
break;
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
break;
}
- /* Intentional fall thru */
+ fallthrough;
case NEXTHOP_TYPE_IPV4_IFINDEX:
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV6:
if (nh->ifindex == IFINDEX_INTERNAL)
continue;
- /* fallthru */
+ fallthrough;
case NEXTHOP_TYPE_IPV4_IFINDEX:
nhaddr = nh->gate.ipv4;
break;
if (nh->ifindex == IFINDEX_INTERNAL)
continue;
- /* fallthru */
+ fallthrough;
case NEXTHOP_TYPE_IPV6_IFINDEX:
nhaddr = nh->gate.ipv6;
break;
switch (type) {
case CAPABILITY:
len += 2; /* to cover the OPT-Param header */
- _FALLTHROUGH
+ fallthrough;
case OPT_PARAM:
printf("len: %u\n", len);
/* peek_for_as4 wants getp at capibility*/
"%s: calls function pointer from unhandled const GEP\n",
prefix);
*hdr_written = true;
- /* fallthru */
+ fallthrough;
default:
/* to help the user / development */
if (!*hdr_written) {
"Phased restart: all routing daemon stop jobs have completed.");
set_phase(PHASE_WAITING_DOWN);
- /*FALLTHRU*/
+ fallthrough;
case PHASE_WAITING_DOWN:
if (gs.numdown + IS_UP(gs.special) < gs.numdaemons)
break;
1);
set_phase(PHASE_ZEBRA_RESTART_PENDING);
- /*FALLTHRU*/
+ fallthrough;
case PHASE_ZEBRA_RESTART_PENDING:
if (gs.special->restart.pid)
break;
gs.special->name);
set_phase(PHASE_WAITING_ZEBRA_UP);
- /*FALLTHRU*/
+ fallthrough;
case PHASE_WAITING_ZEBRA_UP:
if (!IS_UP(gs.special))
break;
if (op == DPLANE_OP_ROUTE_DELETE)
break;
- /* FALL THROUGH */
+ fallthrough;
case DPLANE_OP_ROUTE_INSTALL:
rv = netlink_route_multipath_msg_encode(RTM_NEWROUTE, ctx,
&nl_buf[nl_buf_len],
proto = ZEBRA_ROUTE_NHG;
break;
}
- /* Intentional fall thru */
+ proto = ZEBRA_ROUTE_KERNEL;
+ break;
default:
/*
* When a user adds a new protocol this will show up
break;
case NEXTHOP_TYPE_IFINDEX:
snprintf(buf, size, "Ifindex: %u", nexthop->ifindex);
+ break;
case NEXTHOP_TYPE_BLACKHOLE:
break;
}
break;
case NHG_CTX_OP_DEL:
ret = nhg_ctx_process_del(ctx);
+ break;
case NHG_CTX_OP_NONE:
break;
}
ifp ? ifp->name : "Unknown");
break;
case NEXTHOP_TYPE_IPV4:
- /* fallthrough */
case NEXTHOP_TYPE_IPV4_IFINDEX:
inet_ntop(AF_INET, &nexthop->gate, nhname, INET6_ADDRSTRLEN);
break;
iter->vrf_id = VRF_DEFAULT;
iter->afi_safi_ix = -1;
- /* Fall through */
+ fallthrough;
case RIB_TABLES_ITER_S_ITERATING:
iter->afi_safi_ix++;