summaryrefslogtreecommitdiff
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 25109e030b..3c67017dc7 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++)