From: Denis Ovsienko Date: Sat, 15 Feb 2025 20:57:01 +0000 (+0000) Subject: Merge two identical cases in gen_gateway(). X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/d804b29df83dc0791a427e647744840f17caa3a8 Merge two identical cases in gen_gateway(). The filter tests should make is easier to refactor this code. --- diff --git a/gencode.c b/gencode.c index 3d76d215..8c12099a 100644 --- a/gencode.c +++ b/gencode.c @@ -5480,17 +5480,16 @@ gen_gateway(compiler_state_t *cstate, const u_char *eaddr, case DLT_PPI: b0 = gen_wlanhostop(cstate, eaddr, Q_OR); break; + case DLT_IP_OVER_FC: + b0 = gen_ipfchostop(cstate, eaddr, Q_OR); + break; case DLT_SUNATM: /* * This is LLC-multiplexed traffic; if it were * LANE, cstate->linktype would have been set to * DLT_EN10MB. */ - bpf_error(cstate, - "'gateway' supported only on ethernet/FDDI/token ring/802.11/ATM LANE/Fibre Channel"); - case DLT_IP_OVER_FC: - b0 = gen_ipfchostop(cstate, eaddr, Q_OR); - break; + /* FALLTHROUGH */ default: bpf_error(cstate, "'gateway' supported only on ethernet/FDDI/token ring/802.11/ATM LANE/Fibre Channel");