From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: [iproute PATCH 2/4] bridge: Fix check for colored output Date: Wed, 15 Aug 2018 11:06:08 +0200 Message-ID: <20180815090610.16646-3-phil@nwl.cc> References: <20180815090610.16646-1-phil@nwl.cc> Cc: netdev@vger.kernel.org, Till Maas To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:40022 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728576AbeHOL5q (ORCPT ); Wed, 15 Aug 2018 07:57:46 -0400 In-Reply-To: <20180815090610.16646-1-phil@nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: There is no point in calling enable_color() conditionally if it was already called for each time '-color' flag was parsed. Align the algorithm with that in ip and tc by actually making use of 'color' variable. Fixes: e9625d6aead11 ("Merge branch 'iproute2-master' into iproute2-next") Signed-off-by: Phil Sutter --- bridge/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/bridge.c b/bridge/bridge.c index 7fcfe1116f6e5..289a157d37f03 100644 --- a/bridge/bridge.c +++ b/bridge/bridge.c @@ -174,7 +174,7 @@ main(int argc, char **argv) if (netns_switch(argv[1])) exit(-1); } else if (matches(opt, "-color") == 0) { - enable_color(); + ++color; } else if (matches(opt, "-compressvlans") == 0) { ++compress_vlans; } else if (matches(opt, "-force") == 0) { -- 2.18.0