iproute/0003-tc-Fix-typo-in-check-for-colored-output.patch
2018-08-23 17:58:43 +02:00

34 lines
950 B
Diff

From 1824d687058b2c818ae057321d7ca67de46b0fbb Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Wed, 15 Aug 2018 18:21:24 +0200
Subject: [PATCH] tc: Fix typo in check for colored output
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 <phil@nwl.cc>
Signed-off-by: David Ahern <dsahern@gmail.com>
(cherry picked from commit 0d0e0e0bef68f888bedb8d8f343baa943207dafc)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
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