bridge: Fix check for colored output
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: e9625d6aea ("Merge branch 'iproute2-master' into iproute2-next")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
0d0e0e0bef
commit
5332148deb
|
|
@ -174,7 +174,7 @@ main(int argc, char **argv)
|
||||||
if (netns_switch(argv[1]))
|
if (netns_switch(argv[1]))
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else if (matches(opt, "-color") == 0) {
|
} else if (matches(opt, "-color") == 0) {
|
||||||
enable_color();
|
++color;
|
||||||
} else if (matches(opt, "-compressvlans") == 0) {
|
} else if (matches(opt, "-compressvlans") == 0) {
|
||||||
++compress_vlans;
|
++compress_vlans;
|
||||||
} else if (matches(opt, "-force") == 0) {
|
} else if (matches(opt, "-force") == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue