mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 11:50:21 +00:00
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>
This commit is contained in:
parent
89f0982149
commit
06af0667ad
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user