Skip to content

Commit 7c7331e

Browse files
s3rj1kCopilot
andcommitted
Don't redeclare MAC absence error
Co-authored-by: Copilot <[email protected]> Signed-off-by: s3rj1k <[email protected]>
1 parent 103830d commit 7c7331e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

baremetal/metal3data_manager.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,10 @@ func getLinkMacAddress(mac *infrav1.NetworkLinkEthernetMac,
14241424
return "", errors.New("no MAC address given")
14251425
}
14261426

1427-
var macaddress, err = "", errors.New("no MAC address given")
1427+
var (
1428+
macaddress string
1429+
err error
1430+
)
14281431

14291432
if mac.String != nil {
14301433
// if a string was given

0 commit comments

Comments
 (0)