* [iproute PATCH] tc: Remove pointless assignments in batch()
@ 2018-10-18 13:48 Phil Sutter
2018-10-22 17:08 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2018-10-18 13:48 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Chris Mi, netdev
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>
---
tc/tc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tc/tc.c b/tc/tc.c
index c493d5e92e0dd..eacd5c08573d4 100644
--- 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;
--
2.19.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [iproute PATCH] tc: Remove pointless assignments in batch()
2018-10-18 13:48 [iproute PATCH] tc: Remove pointless assignments in batch() Phil Sutter
@ 2018-10-22 17:08 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-10-22 17:08 UTC (permalink / raw)
To: Phil Sutter; +Cc: Chris Mi, netdev
On Thu, 18 Oct 2018 15:48:48 +0200
Phil Sutter <phil@nwl.cc> wrote:
> 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>
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-23 1:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 13:48 [iproute PATCH] tc: Remove pointless assignments in batch() Phil Sutter
2018-10-22 17:08 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).