BUILD/CLEANUP: systemd: avoid a warning due to mixed code and declaration
Gcc complains because the systemd wrapper mixed code and declaration :
"warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]".
(cherry picked from commit d1039e5dc5a7d08ca4451155d363d62e236b85c2)
diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c
index f9e2e0c..a78e75b 100644
--- a/src/haproxy-systemd-wrapper.c
+++ b/src/haproxy-systemd-wrapper.c
@@ -168,6 +168,7 @@
int main(int argc, char **argv)
{
int status;
+ struct sigaction sa;
wrapper_argc = argc;
wrapper_argv = argv;
@@ -175,7 +176,6 @@
--argc; ++argv;
init(argc, argv);
- struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sa.sa_handler = &signal_handler;
sigaction(SIGUSR2, &sa, NULL);