Skip to content

Commit 35651d4

Browse files
author
John Lam
committed
Refactors log statement positioning in cleanupSingleDPDKInterface
Moves the log statement outside the else block to improve code readability while maintaining the same logical flow. This eliminates an unnecessary nesting level without changing the function's behavior.
1 parent eab943f commit 35651d4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cmd/eni-manager/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4136,9 +4136,8 @@ func cleanupSingleDPDKInterface(pciAddr, nodeENIName string, cfg *config.ENIMana
41364136
log.Printf("Warning: Both modern and legacy SR-IOV config removal failed for PCI %s: modern=%v, legacy=%v",
41374137
pciAddr, err, legacyErr)
41384138
return false
4139-
} else {
4140-
log.Printf("Removed SR-IOV config for PCI %s using legacy format (NodeENI: %s)", pciAddr, nodeENIName)
41414139
}
4140+
log.Printf("Removed SR-IOV config for PCI %s using legacy format (NodeENI: %s)", pciAddr, nodeENIName)
41424141
} else {
41434142
log.Printf("Removed SR-IOV config for PCI %s using modern format (NodeENI: %s)", pciAddr, nodeENIName)
41444143
}

0 commit comments

Comments
 (0)