diff mbox series

[v2,3/6] tools/misc: xenwatchdogd: add static qualifier

Message ID 20240329111056.6118-4-leigh@solinno.co.uk (mailing list archive)
State Superseded
Headers show
Series xenwatchdogd bugfixes and enhancements | expand

Commit Message

Leigh Brown March 29, 2024, 11:10 a.m. UTC
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>
---
 tools/misc/xenwatchdogd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Anthony PERARD April 9, 2024, 2:31 p.m. UTC | #1
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 mbox series

Patch

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;