commit | 0b2f7153f2bfcb3897d34838105568fa90324bf5 | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@gnumonks.org> | Sun Apr 16 19:49:24 2017 +0200 |
committer | Harald Welte <laforge@gnumonks.org> | Thu Apr 27 09:50:51 2017 +0200 |
tree | 0bede7b3008d262cbfbb1544bb0c9f4b80cd0018 | |
parent | 31c0fef2fd5daa53617c05752411ec6446d8a82b [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
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 6ab34c7..c4b6f91 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c
@@ -706,7 +706,7 @@ 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;