From 14c831e00378e4609be44f37e0c56f2af950d225 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 25 Mar 2025 16:31:18 -0700 Subject: [PATCH] libnetwork/netavark: simplify isMacVlan init This fixes the following staticcheck warning: > libnetwork/netavark/config.go:297:2: QF1007: could merge conditional assignment into variable declaration (staticcheck) > isMacVlan := true > ^ Signed-off-by: Kir Kolyshkin --- common/libnetwork/netavark/config.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/libnetwork/netavark/config.go b/common/libnetwork/netavark/config.go index 4916f725e1..6c17bd0a19 100644 --- a/common/libnetwork/netavark/config.go +++ b/common/libnetwork/netavark/config.go @@ -294,10 +294,7 @@ func createIpvlanOrMacvlan(network *types.Network) error { } driver := network.Driver - isMacVlan := true - if driver == types.IPVLANNetworkDriver { - isMacVlan = false - } + isMacVlan := driver != types.IPVLANNetworkDriver // always turn dns off with macvlan, it is not implemented in netavark // and makes little sense to support with macvlan