Skip to content

Commit 332abf9

Browse files
committed
Dedup SIOCSIFMTU ioctl handler via fall-through
The else branch in ff_veth_ioctl() SIOCSIFMTU duplicated the ether_ioctl call already present in the default case. Move break into the mtu_enable branch and let the disabled path fall through to default.
1 parent 0f8f699 commit 332abf9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/ff_veth.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,9 @@ ff_veth_ioctl(if_t ifp, u_long cmd, caddr_t data)
251251
error = ff_dpdk_if_set_mtu(sc->host_ctx, new_mtu);
252252
if (error == 0)
253253
if_setmtu(ifp, new_mtu);
254-
} else {
255-
error = ether_ioctl(ifp, cmd, data);
254+
break;
256255
}
257-
break;
256+
/* fall through */
258257
default:
259258
error = ether_ioctl(ifp, cmd, data);
260259
break;

0 commit comments

Comments
 (0)