The `NULL` check for newly created groups (`updgroup` and `subgroup`)
are unnecessary, just remove them.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
}
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;
}
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))