netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: jiri@resnulli.us, chrism@mellanox.com
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC iproute2 1/4] Revert "tc: Remove pointless assignments in batch()"
Date: Wed, 31 Jul 2019 17:45:03 -0700	[thread overview]
Message-ID: <20190801004506.9049-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20190801004506.9049-1-stephen@networkplumber.org>

This reverts commit 6358bbc381c6e38465838370bcbbdeb77ec3565a.
---
 tc/tc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tc/tc.c b/tc/tc.c
index 64e342dd85bf..1f23971ae4b9 100644
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -326,11 +326,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;
@@ -359,6 +359,7 @@ 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,6 +395,7 @@ 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.20.1


  reply	other threads:[~2019-08-01  0:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01  0:45 [RFC iproute2 0/4] Revert tc batchsize feature Stephen Hemminger
2019-08-01  0:45 ` Stephen Hemminger [this message]
2019-08-01  0:45 ` [RFC iproute2 2/4] Revert "tc: flush after each command in batch mode" Stephen Hemminger
2019-08-01  0:45 ` [RFC iproute2 3/4] Revert "tc: fix batch force option" Stephen Hemminger
2019-08-01  0:45 ` [RFC iproute2 4/4] Revert "tc: Add batchsize feature for filter and actions" Stephen Hemminger
2019-08-01  1:11 ` [RFC iproute2 0/4] Revert tc batchsize feature Dave Taht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190801004506.9049-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=chrism@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).