The pointers in those checks are guaranteed to be non-NULL at that
point in the code. There is no need to check them as pointed out
by coverity.

Signed-off-by: Ales Musil <[email protected]>
---
 northd/northd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 3037ce0b5..6087d170d 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -2397,7 +2397,7 @@ join_logical_ports(const struct sbrec_port_binding_table 
*sbrec_pb_table,
             /* If the router is multicast enabled then set relay on the switch
              * datapath.
              */
-            if (peer->od && peer->od->mcast_info.rtr.relay) {
+            if (peer->od->mcast_info.rtr.relay) {
                 op->od->mcast_info.sw.flood_relay = true;
             }
 
@@ -3523,7 +3523,7 @@ ovn_lb_svc_create(struct ovsdb_idl_txn *ovnsb_txn,
             }
 
             const char *chassis_name = NULL;
-            if (op->sb && op->sb->chassis) {
+            if (op->sb->chassis) {
                 chassis_name = op->sb->chassis->name;
             }
 
@@ -9910,8 +9910,7 @@ build_lswitch_dhcp_options_and_response(struct ovn_port 
*op,
         return;
     }
 
-    if (op->od && op->od->nbs
-        && ls_dhcp_relay_port(op->od)) {
+    if (ls_dhcp_relay_port(op->od)) {
         /* Don't add the DHCP server flows if DHCP Relay is enabled on the
          * logical switch. */
         return;
-- 
2.47.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to