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>
This commit is contained in:
Quentin Young 2018-04-11 15:19:23 -04:00
parent 316f27e169
commit aaf24c74e4

View File

@ -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,