diff options
author | Phil Sutter <phil@nwl.cc> | 2018-09-19 15:17:04 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-09-24 11:49:57 +0200 |
commit | 7e50ebabbf9c3a5eeb9511d9f32c6104b56da5cd (patch) | |
tree | 8096c2c282213fa2bdb6c9da6df58f4fa0e72608 /iptables/ip6tables-restore.c | |
parent | f40ce2d853591220f16c0851bf8665e6967af1f1 (diff) |
Fix a few cases of pointless assignments
This gets rid of a number of assignments which are either redundant or
not used afterwards.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/ip6tables-restore.c')
-rw-r--r-- | iptables/ip6tables-restore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c index 2bb303ac..3706b981 100644 --- a/iptables/ip6tables-restore.c +++ b/iptables/ip6tables-restore.c @@ -316,14 +316,14 @@ int ip6tables_restore_main(int argc, char *argv[]) } else if (in_table) { int a; - char *ptr = buffer; char *pcnt = NULL; char *bcnt = NULL; char *parsestart; if (buffer[0] == '[') { /* we have counters in our input */ - ptr = strchr(buffer, ']'); + char *ptr = strchr(buffer, ']'); + if (!ptr) xtables_error(PARAMETER_PROBLEM, "Bad line %u: need ]\n", |