diff options
author | anlan_cs <vic.lan@pica8.com> | 2023-04-16 07:41:40 +0200 |
---|---|---|
committer | anlan_cs <vic.lan@pica8.com> | 2023-04-16 07:52:35 +0200 |
commit | 06af0667add9accffd615d73cabe45c5884ff4c3 (patch) | |
tree | 20d3845a3bb11ed80aba966040340ba7d4f33db2 /bgpd/bgp_updgrp.c | |
parent | Merge pull request #13298 from opensourcerouting/dead-import-check (diff) | |
download | frr-06af0667add9accffd615d73cabe45c5884ff4c3.tar.xz frr-06af0667add9accffd615d73cabe45c5884ff4c3.zip |
bgpd: Remove unnecessary check for groups
The `NULL` check for newly created groups (`updgroup` and `subgroup`)
are unnecessary, just remove them.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'bgpd/bgp_updgrp.c')
-rw-r--r-- | bgpd/bgp_updgrp.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 72dca9f70..0b1e54916 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -1961,15 +1961,8 @@ void update_group_adjust_peer(struct peer_af *paf) } updgrp = update_group_find(paf); - if (!updgrp) { + if (!updgrp) updgrp = update_group_create(paf); - if (!updgrp) { - flog_err(EC_BGP_UPDGRP_CREATE, - "couldn't create update group for peer %s", - paf->peer->host); - return; - } - } old_subgrp = paf->subgroup; @@ -1992,11 +1985,8 @@ void update_group_adjust_peer(struct peer_af *paf) } subgrp = update_subgroup_find(updgrp, paf); - if (!subgrp) { + if (!subgrp) subgrp = update_subgroup_create(updgrp); - if (!subgrp) - return; - } update_subgroup_add_peer(subgrp, paf, 1); if (BGP_DEBUG(update_groups, UPDATE_GROUPS)) |