From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: [iproute PATCH 1/4] tc: Fix typo in check for colored output Date: Wed, 15 Aug 2018 11:06:07 +0200 Message-ID: <20180815090610.16646-2-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]:40038 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728576AbeHOL55 (ORCPT ); Wed, 15 Aug 2018 07:57:57 -0400 In-Reply-To: <20180815090610.16646-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