From a5798dead5601e5049fefe7c424b4a8b51141b83 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Tue, 9 Aug 2016 17:20:24 +0200 Subject: [PATCH] Fix unitialized warning --- nmrp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nmrp.c b/nmrp.c index 39d37f9..6ed8c55 100644 --- a/nmrp.c +++ b/nmrp.c @@ -462,7 +462,11 @@ int nmrp_do(struct nmrpd_args *args) return 1; } - status = is_valid_ip(sock, &ipaddr, &ipmask); + gsock = sock; + garp = 0; + sigh_orig = signal(SIGINT, sigh); + + status = is_valid_ip(sock, &ipconf.addr, &ipconf.mask); if (status <= 0) { if (!status) { fprintf(stderr, "Address %s/%s cannot be used on interface %s.\n", @@ -471,10 +475,6 @@ int nmrp_do(struct nmrpd_args *args) goto out; } - gsock = sock; - garp = 0; - sigh_orig = signal(SIGINT, sigh); - if (ethsock_set_timeout(sock, args->rx_timeout)) { goto out; } -- 2.25.1