Message ID | 20240329111056.6118-4-leigh@solinno.co.uk (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xenwatchdogd bugfixes and enhancements | expand |
On Fri, Mar 29, 2024 at 11:10:53AM +0000, leigh@solinno.co.uk wrote: > From: Leigh Brown <leigh@solinno.co.uk> > > Make all functions except main() static in xenwatchdogd.c. Also make > the remaining global variable static. > > Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> Thanks,
diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index 35a0df655a..2e7f9f51c5 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -11,11 +11,11 @@ #include <stdio.h> #include <stdbool.h> -xc_interface *h; +static xc_interface *h; static bool safeexit = false; static bool done = false; -void daemonize(void) +static void daemonize(void) { switch (fork()) { case -1: @@ -38,12 +38,12 @@ void daemonize(void) err(EXIT_FAILURE, "reopen stderr"); } -void catch_exit(int sig) +static void catch_exit(int sig) { done = true; } -void catch_usr1(int sig) +static void catch_usr1(int sig) { safeexit = true; done = true;