From e3899d1b760403fa1615c46e9fe0114b9fbe164e Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Sun, 28 Nov 2021 22:10:07 +1100 Subject: [PATCH] Give a magic number a better name --- src/edge_management.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/edge_management.c b/src/edge_management.c index eea5f22..efd90b0 100644 --- a/src/edge_management.c +++ b/src/edge_management.c @@ -315,8 +315,10 @@ static const mgmt_handler_t mgmt_handlers[] = { // TODO: help_events }; +#define MAX_TOPICS 10 + /* Current subscriber for each event topic */ -static mgmt_req_t *mgmt_event_subscribers[10]; +static mgmt_req_t *mgmt_event_subscribers[MAX_TOPICS]; /* Map topic number to function */ static const void (*mgmt_events[])(mgmt_req_t *req, char *udp_buf) = {