summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp_adv.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-06-29 13:53:39 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-06-29 21:27:50 +0200
commit4953391b450351794a0cf646aa8bf9fea9869df8 (patch)
tree10504909a60c60bc81bc11e18fd0d17b90cc46e8 /bgpd/bgp_updgrp_adv.c
parentbgpd: No need casting to boolean for boolean (diff)
downloadfrr-4953391b450351794a0cf646aa8bf9fea9869df8.tar.xz
frr-4953391b450351794a0cf646aa8bf9fea9869df8.zip
bgpd: Avoid more assignments within checks (round 2)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_updgrp_adv.c')
-rw-r--r--bgpd/bgp_updgrp_adv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index 18829aa74..9c2288cba 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -572,7 +572,8 @@ void bgp_adj_out_unset_subgroup(struct bgp_dest *dest,
return;
/* Lookup existing adjacency */
- if ((adj = adj_lookup(dest, subgrp, addpath_tx_id)) != NULL) {
+ adj = adj_lookup(dest, subgrp, addpath_tx_id);
+ if (adj != NULL) {
/* Clean up previous advertisement. */
if (adj->adv)
bgp_advertise_clean_subgroup(subgrp, adj);