Because of the break in the loop, ofPort is always 0 when the if
statement is reached, so it can safely be removed.
Change-Id: Ia700962e9d5a7d8a4dd0fa1af61811694ac366fe
Signed-off-by: Stephen Kitt <skitt@redhat.com>
if (ofPort == 0L) {
for (int i = 0; i < 5; i++) {
LOG.info("Looking for ofPort {}, try: {}", portName, i);
- if (ofPort == 0L) {
- TerminationPoint tp = southbound.readTerminationPoint(bridgeNode, null, portName);
- if (tp != null) {
- port = tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
- if (port != null) {
- ofPort = southbound.getOFPort(port);
- break;
- }
+ TerminationPoint tp = southbound.readTerminationPoint(bridgeNode, null, portName);
+ if (tp != null) {
+ port = tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
+ if (port != null) {
+ ofPort = southbound.getOFPort(port);
+ break;
}
}
try {