From ef84b7645fbf537eab8ecf49e88264ae6d013fad Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 6 Sep 2019 11:55:34 +0200 Subject: move declarations to loop --- udp514-journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udp514-journal.c b/udp514-journal.c index 9a1db8b..b73f992 100644 --- a/udp514-journal.c +++ b/udp514-journal.c @@ -9,9 +9,7 @@ int main(int argc, char **argv) { int sock; - socklen_t len; struct sockaddr_in cliAddr, servAddr; - char buffer[BUFFER_SIZE]; const int opt_val = 1; unsigned int count = 0; @@ -36,6 +34,8 @@ int main(int argc, char **argv) { /* server loop */ while (1) { + char buffer[BUFFER_SIZE]; + socklen_t len; char * match; CODE * pri; uint8_t priority = LOG_INFO; -- cgit v1.2.3-70-g09d2