[VOL-3285] Resolving statis code analysis warnings
Change-Id: Iaddaae92c649fd27ce0a63f1786af594667c9e8e
diff --git a/internal/bbsim/devices/nni.go b/internal/bbsim/devices/nni.go
index fabe69c..e74e97b 100644
--- a/internal/bbsim/devices/nni.go
+++ b/internal/bbsim/devices/nni.go
@@ -71,7 +71,7 @@
}),
Type: "nni",
}
- createNNIPair(executor, olt, &nniPort)
+ _ = createNNIPair(executor, olt, &nniPort)
return nniPort, nil
}
@@ -81,7 +81,7 @@
isDhcp := packetHandlers.IsDhcpPacket(packet)
isLldp := packetHandlers.IsLldpPacket(packet)
- if isDhcp == false && isLldp == false {
+ if !isDhcp && !isLldp {
nniLogger.WithFields(log.Fields{
"packet": packet,
}).Trace("Dropping NNI packet as it's not DHCP")
@@ -145,14 +145,6 @@
return nil
}
-func deleteNNIPair(executor Executor, nniPort *NniPort) error {
- if err := executor.Command("ip", "link", "del", nniPort.nniVeth).Run(); err != nil {
- nniLogger.Errorf("Couldn't delete veth pair between %s and %s", nniPort.nniVeth, nniPort.upstreamVeth)
- return err
- }
- return nil
-}
-
// NewVethChan returns a new channel for receiving packets over the NNI interface
func (n *NniPort) NewVethChan() (chan *types.PacketMsg, *pcap.Handle, error) {
ch, handle, err := listenOnVeth(n.nniVeth)