summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-11 21:19:23 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-13 23:17:42 +0200
commitaaf24c74e44438a55decfc1e2f0930f800a3a650 (patch)
treeeae2b367777250559319c7c152b4257ecf60de0a /babeld
parentbgpd: rfapi xcallocs guaranteed non-null (diff)
downloadfrr-aaf24c74e44438a55decfc1e2f0930f800a3a650.tar.xz
frr-aaf24c74e44438a55decfc1e2f0930f800a3a650.zip
babeld: be more explicit about route resize result
Resizing the route array can fail. Although the error condition is already correctly handled, if we're more explicit about the variables we expect to be initialized then clang-analyze is happier. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/babeld/route.c b/babeld/route.c
index 501dd1f4d..bc7590fb3 100644
--- a/babeld/route.c
+++ b/babeld/route.c
@@ -176,6 +176,7 @@ insert_route(struct babel_route *route)
resize_route_table(max_route_slots < 1 ? 8 : 2 * max_route_slots);
if(route_slots >= max_route_slots)
return NULL;
+ assert(routes);
route->next = NULL;
if(n < route_slots)
memmove(routes + n + 1, routes + n,