[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220108204650.36185-5-sthemmin@microsoft.com>
Date: Sat, 8 Jan 2022 12:46:43 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <sthemmin@...rosoft.com>, gnault@...hat.com,
Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH iproute2-next 04/11] m_vlan: fix formatting of push ethernet src mac
This was reported as a clang warning:
CC m_vlan.o
m_vlan.c:282:32: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
if (tb[TCA_VLAN_PUSH_ETH_SRC &&
^
But it is really a bug in the code for displaying the pushed
source mac.
Fixes: d61167dd88b4 ("m_vlan: add pop_eth and push_eth actions")
Cc: gnault@...hat.com
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
tc/m_vlan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tc/m_vlan.c b/tc/m_vlan.c
index 221083dfc0da..1b2b1d51ed2d 100644
--- a/tc/m_vlan.c
+++ b/tc/m_vlan.c
@@ -279,8 +279,8 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg)
ETH_ALEN, 0, b1, sizeof(b1));
print_string(PRINT_ANY, "dst_mac", " dst_mac %s", b1);
}
- if (tb[TCA_VLAN_PUSH_ETH_SRC &&
- RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN]) {
+ if (tb[TCA_VLAN_PUSH_ETH_SRC] &&
+ RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN) {
ll_addr_n2a(RTA_DATA(tb[TCA_VLAN_PUSH_ETH_SRC]),
ETH_ALEN, 0, b1, sizeof(b1));
print_string(PRINT_ANY, "src_mac", " src_mac %s", b1);
--
2.30.2
Powered by blists - more mailing lists