From 37f91bf3304aa29c67fc708f2893ea3da937082b Mon Sep 17 00:00:00 2001 From: Petar Kapris Date: Wed, 25 Nov 2020 17:44:05 +0100 Subject: [PATCH] Shorten length of array in config_ent to 4 The string array *messages[] in the config_ent structure, which is used to store configuration data during runtime, has been shortened to have 4 strings, rather than 10, this is due to the fact that it's only used with indeces IDLEMSG, SESSMSG, DAYMSG and NOLOGINMSG, or a variable with one of these as a value. These indeces are all symbolic constants with values 0 through 3, so only 4 members in the array are needed. --- timeoutd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timeoutd.c b/timeoutd.c index 096ec5c..1d6c175 100644 --- a/timeoutd.c +++ b/timeoutd.c @@ -183,7 +183,7 @@ struct config_ent { int sessmax; int daymax; int warntime; - char *messages[10]; + char *messages[4]; }; struct config_ent *config[MAXLINES + 1];