diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2021-11-30 10:55:31 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-11-30 20:55:17 +0100 |
commit | b612f69e558bb9dad8140c1d793955e1fb2d9332 (patch) | |
tree | d13f7da59e833f822ead00546479cffde0f27f6c /filter/ulogd_filter_IP2STR.c | |
parent | e9ae548078135f047b855177906040d86d75ee08 (diff) |
filter: HWHDR: simplify flow-control
The `interp_mac2str` function concludes with a `switch` followed by a
`return` statement.
The `switch` has one case falling through to a default:
switch (expr) {
case X:
// ... X code ...
default:
// ... default code ...
}
This is equivalent to the simpler and more readily comprehensible:
if (expr == X) {
// ... X code ...
}
// ... default code ...
Replace the former with the latter.
Doing so makes it obvious that the following `return` statement is never
reached. Remove it.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'filter/ulogd_filter_IP2STR.c')
0 files changed, 0 insertions, 0 deletions