aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-08-13 10:19:36 -0700
committerMichal Kubecek <mkubecek@suse.cz>2021-08-24 18:23:00 +0200
commit6cf8d25c5be464f770c80b0993bf6a96755c832d (patch)
tree1da367cb0830106f26d3028391559816d22e242c
parent8b8cb55d5625218e1142c7ac3a6b2e902ab1b63b (diff)
downloadethtool-6cf8d25c5be464f770c80b0993bf6a96755c832d.tar.gz
ethtool: remove questionable goto
goto opt_found can be trivially replaced by an else branch. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--ethtool.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ethtool.c b/ethtool.c
index 33a0a49..8cf1b13 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -6352,15 +6352,14 @@ int main(int argc, char **argp)
nlfunc = args[k].nlfunc;
nlchk = args[k].nlchk;
no_dev = args[k].no_dev;
- goto opt_found;
+ } else {
+ if ((*argp)[0] == '-')
+ exit_bad_args();
+ nlfunc = nl_gset;
+ func = do_gset;
+ no_dev = false;
}
- if ((*argp)[0] == '-')
- exit_bad_args();
- nlfunc = nl_gset;
- func = do_gset;
- no_dev = false;
-opt_found:
if (!no_dev) {
ctx.devname = *argp++;
argc--;