Message ID | 20230804035346.2879318-6-ruanjinjie@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | net: Remove unnecessary ternary operators | expand |
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 2513be6d4e11..a0d915d1dbed 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -612,7 +612,7 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) eth = (struct ethhdr *)skb->data; my_epid = hw->my_epid; - vlan = (vlan_get_tag(skb, &vlan_id) == 0) ? true : false; + vlan = vlan_get_tag(skb, &vlan_id) == 0; data = skb->data; len = skb->len;
There is a ternary operator, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> --- drivers/net/fjes/fjes_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)