Module: check_mk
Branch: master
Commit: 14d6b648893ccc6bd0bc735786ec2f30e36ea0ee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14d6b648893ccc…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Nov 24 13:34:54 2015 +0100
Reordered stuff.
---
agents/waitmax.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/agents/waitmax.c b/agents/waitmax.c
index cb861bd..9d14f84 100644
--- a/agents/waitmax.c
+++ b/agents/waitmax.c
@@ -31,6 +31,10 @@
#include <sys/wait.h>
#include <unistd.h>
+static int g_pid;
+static int g_timeout = 0;
+static int g_signum = 15;
+
static void out(const char *buf)
{
size_t bytes_to_write = strlen(buf);
@@ -45,15 +49,6 @@ static void out(const char *buf)
}
}
-static int g_pid;
-static int g_timeout = 0;
-static int g_signum = 15;
-
-static struct option long_options[] = {{"version", no_argument, 0,
'V'},
- {"help", no_argument, 0, 'h'},
- {"signal", required_argument, 0,
's'},
- {0, 0, 0, 0}};
-
static void version()
{
out(
@@ -86,6 +81,11 @@ static void signalhandler(int signum __attribute__((__unused__)))
if (kill(g_pid, g_signum) == 0) g_timeout = 1;
}
+static struct option long_options[] = {{"version", no_argument, 0,
'V'},
+ {"help", no_argument, 0, 'h'},
+ {"signal", required_argument, 0,
's'},
+ {0, 0, 0, 0}};
+
int main(int argc, char **argv)
{
int indexptr = 0;