Fix uninitialized warning
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 19 Mar 2016 14:37:07 +0000 (15:37 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 19 Mar 2016 14:37:07 +0000 (15:37 +0100)
nmrp.c

diff --git a/nmrp.c b/nmrp.c
index a374c6cc6d89c4115b88cf287b3c64ea26528bb5..c696fccaebb22a07fa4acd3c934f9b93ec66243b 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -393,6 +393,8 @@ int nmrp_do(struct nmrpd_args *args)
                return 1;
        }
 
+       sigh_orig = signal(SIGINT, sigh);
+
        status = is_valid_ip(sock, &ipaddr, &ipmask);
        if (status <= 0) {
                if (!status) {
@@ -403,7 +405,6 @@ int nmrp_do(struct nmrpd_args *args)
        }
 
        gsock = sock;
-       sigh_orig = signal(SIGINT, sigh);
 
        if (ethsock_set_timeout(sock, args->rx_timeout)) {
                goto out;