lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ