Moti Asayag has posted comments on this change.

Change subject: engine: fix coverity issue- add null safety check to 
getPciDeviceNameByNic
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/39444/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java:

Line 214:     @Override
Line 215:     public String getPciDeviceNameByNic(VdsNetworkInterface nic) {
Line 216:         HostDevice pciDevice = getPciDeviceByNic(nic, 
getDevicesByHostId(nic.getVdsId()));
Line 217: 
Line 218:         if (pciDevice != null) {
would you mind replacing it with a ternary 'if' ?

   return pciDevice == null ? null : pciDevice.getDeviceName();
Line 219:             return pciDevice.getDeviceName();
Line 220:         }
Line 221: 
Line 222:         return null;


-- 
To view, visit https://gerrit.ovirt.org/39444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b5a5b293279e116958f8f1828023c162b58d99d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to