From: Phil Sutter Subject: [iproute PATCH 1/4] tc: Fix typo in check for colored output Date: Wed, 15 Aug 2018 18:21:24 +0200 Message-ID: <20180815162127.21477-2-phil@nwl.cc> References: <20180815162127.21477-1-phil@nwl.cc> Cc: netdev@vger.kernel.org, Till Maas , David Ahern To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:41102 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729300AbeHOTO2 (ORCPT ); Wed, 15 Aug 2018 15:14:28 -0400 In-Reply-To: <20180815162127.21477-1-phil@nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: The check used binary instead of boolean AND, which means colored output was enabled only if the number of specified '-color' flags was odd. Fixes: 2d165c0811058 ("tc: implement color output") Signed-off-by: Phil Sutter --- tc/tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/tc.c b/tc/tc.c index 3bb5910ffac52..3bb893756f40e 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -515,7 +515,7 @@ int main(int argc, char **argv) _SL_ = oneline ? "\\" : "\n"; - if (color & !json) + if (color && !json) enable_color(); if (batch_file) -- 2.18.0