diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 13:53:39 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 21:27:50 +0200 |
commit | 4953391b450351794a0cf646aa8bf9fea9869df8 (patch) | |
tree | 10504909a60c60bc81bc11e18fd0d17b90cc46e8 /bgpd/bgp_aspath.c | |
parent | bgpd: No need casting to boolean for boolean (diff) | |
download | frr-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_aspath.c')
-rw-r--r-- | bgpd/bgp_aspath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 25109e030..3c67017dc 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -193,7 +193,8 @@ static struct assegment *assegment_prepend_asns(struct assegment *seg, if (num >= AS_SEGMENT_MAX) return seg; /* we don't do huge prepends */ - if ((newas = assegment_data_new(seg->length + num)) == NULL) + newas = assegment_data_new(seg->length + num); + if (newas == NULL) return seg; for (i = 0; i < num; i++) |