]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
bridge: Fix check for colored output
authorPhil Sutter <phil@nwl.cc>
Wed, 15 Aug 2018 16:21:25 +0000 (18:21 +0200)
committerDavid Ahern <dsahern@gmail.com>
Wed, 15 Aug 2018 16:54:51 +0000 (09:54 -0700)
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 <phil@nwl.cc>
Signed-off-by: David Ahern <dsahern@gmail.com>
bridge/bridge.c

index 7fcfe1116f6e5a204151fd468adf662ef3670550..289a157d37f0385102125f3a980130f15b68114f 100644 (file)
@@ -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) {