[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210813171938.1127891-2-kuba@kernel.org>
Date: Fri, 13 Aug 2021 10:19:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: mkubecek@...e.cz, andrew@...n.ch
Cc: netdev@...r.kernel.org, dcavalca@...com, filbranden@...com,
michel@...com, Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH ethtool 1/3] ethtool: remove questionable goto
goto opt_found can be trivially replaced by an else branch.
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
ethtool.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 33a0a492cb15..8cf1b13e4176 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--;
--
2.31.1
Powered by blists - more mailing lists