From: Joseph C. Lehner Date: Tue, 9 Aug 2016 15:20:24 +0000 (+0200) Subject: Fix unitialized warning X-Git-Tag: v0.9.4~5^2 X-Git-Url: https://git.librecmc.org/?p=oweals%2Fnmrpflash.git;a=commitdiff_plain;h=a5798dead5601e5049fefe7c424b4a8b51141b83 Fix unitialized warning --- 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; }