Skip to content

Commit

Permalink
northd: Remove unnecessary pointer checks.
Browse files Browse the repository at this point in the history
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 <amusil@redhat.com>
  • Loading branch information
almusil committed Nov 5, 2024
1 parent fce6b4b commit 41d4584
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions northd/northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 41d4584

Please sign in to comment.