From 0b59d9f255a9b1c366fe5da3206d5089167277d4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 25 Oct 2018 12:24:30 +0200 Subject: [PATCH] tc: Remove pointless assignments in batch() Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1602555 Upstream Status: iproute2.git commit 6358bbc381c6e commit 6358bbc381c6e38465838370bcbbdeb77ec3565a Author: Phil Sutter Date: Thu Oct 18 15:48:48 2018 +0200 tc: Remove pointless assignments in batch() 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 Signed-off-by: Stephen Hemminger --- tc/tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tc/tc.c b/tc/tc.c index 2e97f2b..88e22ba 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -322,11 +322,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; @@ -355,7 +355,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; @@ -391,7 +390,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; -- 1.8.3.1