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