]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: Remove pointless assignments in batch()
authorPhil Sutter <phil@nwl.cc>
Thu, 18 Oct 2018 13:48:48 +0000 (15:48 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 22 Oct 2018 17:05:43 +0000 (10:05 -0700)
All these assignments are later overwritten without reading in between,
so just drop them.

Fixes: 485d0c6001c4a ("tc: Add batchsize feature for filter and actions")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/tc.c

diff --git a/tc/tc.c b/tc/tc.c
index c493d5e92e0ddd9b68fa18ca80e585a83731af75..eacd5c08573d4e9f1bc8bd22a35e218033f86c06 100644 (file)
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -325,11 +325,11 @@ static int batch(const char *name)
        struct batch_buf *head = NULL, *tail = NULL, *buf_pool = NULL;
        char *largv[100], *largv_next[100];
        char *line, *line_next = NULL;
-       bool bs_enabled_next = false;
        bool bs_enabled = false;
        bool lastline = false;
        int largc, largc_next;
        bool bs_enabled_saved;
+       bool bs_enabled_next;
        int batchsize = 0;
        size_t len = 0;
        int ret = 0;
@@ -358,7 +358,6 @@ static int batch(const char *name)
                goto Exit;
        largc = makeargs(line, largv, 100);
        bs_enabled = batchsize_enabled(largc, largv);
-       bs_enabled_saved = bs_enabled;
        do {
                if (getcmdline(&line_next, &len, stdin) == -1)
                        lastline = true;
@@ -394,7 +393,6 @@ static int batch(const char *name)
                len = 0;
                bs_enabled_saved = bs_enabled;
                bs_enabled = bs_enabled_next;
-               bs_enabled_next = false;
 
                if (largc == 0) {
                        largc = largc_next;