]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xshared: Drop needless assignment in --help case
authorPhil Sutter <phil@nwl.cc>
Wed, 22 Nov 2023 02:54:24 +0000 (03:54 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 23 Nov 2023 16:59:42 +0000 (17:59 +0100)
Help text printing code does not refer to optarg, so there is no need to
assign to it if unset.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/xshared.c

index 5f75a0a57a023f55bf395f553c082e0c93675636..53e72b7abb1e8c8b8a9f584af4268bb4114d4671 100644 (file)
@@ -1527,9 +1527,6 @@ void do_parse(int argc, char *argv[],
                        break;
 
                case 'h':
-                       if (!optarg)
-                               optarg = argv[optind];
-
                        /* iptables -p icmp -h */
                        if (!cs->matches && cs->protocol)
                                xtables_find_match(cs->protocol,