Fix GCC 9 string trunction warning

- Increase size of resulting path buffer, unlikely a real problem
- Check return value from snprintf() to detect errors and truncation
- Add logit() function wrapper to initctl, maps to _e()/_d()/_pe()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2020-01-07 01:03:57 +01:00
1 parent 744719219e
commit 8d271ac5b8
5 files changed
+22 -6

No files matched your search

+1 -1
View File
@@ -95,7 +95,7 @@ typedef struct svc {
/* Service details */
pid_t pid;
char pidfile[MAX_ARG_LEN];
char pidfile[256];
long start_time; /* Start time, as seconds since boot, from sysinfo() */
const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */
svc_type_t type; /* Service, run, task, inetd, ... */