conf: relocate global state from legacy parser

Relocate process-wide global variables from legacy parser that ended up
there because it used to be conf.c, but which is now now frozen at the
4.x feature set.  Each variable is moved to their respective "owner".

Give cgroup_current[] and cgroup_settings_current[] named bounds.  Their
extern declarations were unsized, so sizeof() on them stopped compiling
once the definitions moved to another translation unit.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-07-30 15:21:25 +02:00
1 parent 3b866c95e0
commit c20d64587c
5 files changed
+58 -56

No files matched your search

+5 -2
View File
@@ -49,9 +49,12 @@ extern char *osheading;
extern int logfile_size_max;
extern int logfile_count_max;
#define CGROUP_NAME_SIZE 16
#define CGROUP_SETTINGS_SIZE 128
extern struct rlimit global_rlimit[RLIMIT_NLIMITS];
extern char cgroup_current[];
extern char cgroup_settings_current[];
extern char cgroup_current[CGROUP_NAME_SIZE];
extern char cgroup_settings_current[CGROUP_SETTINGS_SIZE];
extern int cgroup_delegate_current;
int str2rlim(char *str);