summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-16 19:49:24 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-27 09:50:51 +0200
commit0b2f7153f2bfcb3897d34838105568fa90324bf5 (patch)
tree0bede7b3008d262cbfbb1544bb0c9f4b80cd0018
parent31c0fef2fd5daa53617c05752411ec6446d8a82b (diff)
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
-rw-r--r--src/ctrl/control_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 6ab34c7b..c4b6f910 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -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;