From 0b2f7153f2bfcb3897d34838105568fa90324bf5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 16 Apr 2017 19:49:24 +0200 Subject: 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 --- src/ctrl/control_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ctrl') 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; -- cgit v1.2.3