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 <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2025-03-25 16:31:18 -07:00
parent 555b817630
commit 14c831e003
1 changed files with 1 additions and 4 deletions

View File

@ -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