From 80dfed11fc1c61ce9168db01dee263447619e859 Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Thu, 28 Aug 2025 23:59:21 +0800 Subject: [PATCH] vtnet: Do not compare boolean with integer The type of variable promisc and allmulti was changed from int to bool by commit [1]. [1] 7dce56596f36 Convert to if_foreach_llmaddr() KPI MFC after: 3 days --- sys/dev/virtio/network/if_vtnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index b4875a37350..867da80a53a 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -3814,9 +3814,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc) if_printf(ifp, "error setting host MAC filter table\n"); out: - if (promisc != 0 && vtnet_set_promisc(sc, true) != 0) + if (promisc && vtnet_set_promisc(sc, true) != 0) if_printf(ifp, "cannot enable promiscuous mode\n"); - if (allmulti != 0 && vtnet_set_allmulti(sc, true) != 0) + if (allmulti && vtnet_set_allmulti(sc, true) != 0) if_printf(ifp, "cannot enable all-multicast mode\n"); }