From 87a524d9313428d55e5a04c2538042629bdc467a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 31 Mar 2020 18:19:27 +0200 Subject: cleanup: delete remains of libutil - exec_t belongs to service.h, the main place where it is used/needed - code for executing exec_t is moved to runsvc for the same reason - what is left are NORETURN and ARRAY_SIZE - the former can be replaced with direct attribute usage since the only relevant compilers all support the attribute. - the later is only used in 3 places and can be trivially replaced with direct usage of sizeof(). Signed-off-by: David Oberhollenzer --- cmd/service/servicecmd.c | 1 - cmd/service/servicecmd.h | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/service') diff --git a/cmd/service/servicecmd.c b/cmd/service/servicecmd.c index 799a6f1..55afaf5 100644 --- a/cmd/service/servicecmd.c +++ b/cmd/service/servicecmd.c @@ -5,7 +5,6 @@ #include "servicecmd.h" #include "service.h" #include "config.h" -#include "util.h" command_t *commands; diff --git a/cmd/service/servicecmd.h b/cmd/service/servicecmd.h index e7cc998..d65c4b5 100644 --- a/cmd/service/servicecmd.h +++ b/cmd/service/servicecmd.h @@ -2,13 +2,14 @@ #ifndef SERVICECMD_H #define SERVICECMD_H +#include #include #include #include #include #include "service.h" -#include "util.h" +#include "config.h" /* Describes a command that can be launched by passing its name as @@ -45,7 +46,7 @@ service_t *loadsvc(const char *directory, const char *filename, int flags); Implemented in servicecmd.c. Prints program usage message and terminates with the given exit status. */ -void usage(int status) NORETURN; +void usage(int status) __attribute__((noreturn)); /* Write a message to stderr that advises the user how to consult the -- cgit v1.2.3