Blame SOURCES/0035-tc-Remove-pointless-assignments-in-batch.patch

930fb9
From 0b59d9f255a9b1c366fe5da3206d5089167277d4 Mon Sep 17 00:00:00 2001
930fb9
From: Phil Sutter <psutter@redhat.com>
930fb9
Date: Thu, 25 Oct 2018 12:24:30 +0200
930fb9
Subject: [PATCH] tc: Remove pointless assignments in batch()
930fb9
930fb9
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1602555
930fb9
Upstream Status: iproute2.git commit 6358bbc381c6e
930fb9
930fb9
commit 6358bbc381c6e38465838370bcbbdeb77ec3565a
930fb9
Author: Phil Sutter <phil@nwl.cc>
930fb9
Date:   Thu Oct 18 15:48:48 2018 +0200
930fb9
930fb9
    tc: Remove pointless assignments in batch()
930fb9
930fb9
    All these assignments are later overwritten without reading in between,
930fb9
    so just drop them.
930fb9
930fb9
    Fixes: 485d0c6001c4a ("tc: Add batchsize feature for filter and actions")
930fb9
    Signed-off-by: Phil Sutter <phil@nwl.cc>
930fb9
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
930fb9
---
930fb9
 tc/tc.c | 4 +---
930fb9
 1 file changed, 1 insertion(+), 3 deletions(-)
930fb9
930fb9
diff --git a/tc/tc.c b/tc/tc.c
930fb9
index 2e97f2b..88e22ba 100644
930fb9
--- a/tc/tc.c
930fb9
+++ b/tc/tc.c
930fb9
@@ -322,11 +322,11 @@ static int batch(const char *name)
930fb9
 	struct batch_buf *head = NULL, *tail = NULL, *buf_pool = NULL;
930fb9
 	char *largv[100], *largv_next[100];
930fb9
 	char *line, *line_next = NULL;
930fb9
-	bool bs_enabled_next = false;
930fb9
 	bool bs_enabled = false;
930fb9
 	bool lastline = false;
930fb9
 	int largc, largc_next;
930fb9
 	bool bs_enabled_saved;
930fb9
+	bool bs_enabled_next;
930fb9
 	int batchsize = 0;
930fb9
 	size_t len = 0;
930fb9
 	int ret = 0;
930fb9
@@ -355,7 +355,6 @@ static int batch(const char *name)
930fb9
 		goto Exit;
930fb9
 	largc = makeargs(line, largv, 100);
930fb9
 	bs_enabled = batchsize_enabled(largc, largv);
930fb9
-	bs_enabled_saved = bs_enabled;
930fb9
 	do {
930fb9
 		if (getcmdline(&line_next, &len, stdin) == -1)
930fb9
 			lastline = true;
930fb9
@@ -391,7 +390,6 @@ static int batch(const char *name)
930fb9
 		len = 0;
930fb9
 		bs_enabled_saved = bs_enabled;
930fb9
 		bs_enabled = bs_enabled_next;
930fb9
-		bs_enabled_next = false;
930fb9
 
930fb9
 		if (largc == 0) {
930fb9
 			largc = largc_next;
930fb9
-- 
930fb9
1.8.3.1
930fb9