control_if: Don't use magic number '5' when allocating vector

We have a proper constant for this (_LAST_CTRL_NODE), so let's use it.

Change-Id: I46275e644166156cb665da70d2964008f1c6cd88
This commit is contained in:
Harald Welte 2017-04-16 19:49:24 +02:00
parent 31c0fef2fd
commit 0b2f7153f2
1 changed files with 1 additions and 1 deletions

View File

@ -706,7 +706,7 @@ static int ctrl_init(void)
if (ctrl_initialized)
return 0;
ctrl_node_vec = vector_init(5);
ctrl_node_vec = vector_init(_LAST_CTRL_NODE);
if (!ctrl_node_vec)
goto err;