]> git.proxmox.com Git - mirror_frr.git/commitdiff
eirgpd: fix clang warning
authorVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:42:55 +0000 (23:42 +0200)
committerVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:42:55 +0000 (23:42 +0200)
opcode is not used.

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
eigrpd/eigrp_packet.c

index f7bbcba328e119c12d19ae5d6aef97949f605d7c..29d95f17b20b72b6470e1598206d367fbabe761b 100644 (file)
@@ -317,7 +317,6 @@ int eigrp_write(struct thread *thread)
        struct ip iph;
        struct msghdr msg;
        struct iovec iov[2];
-       u_int16_t opcode = 0;
        u_int32_t seqno, ack;
 
        int ret;
@@ -363,7 +362,6 @@ int eigrp_write(struct thread *thread)
         * this outgoing packet.
         */
        eigrph = (struct eigrp_header *)STREAM_DATA(ep->s);
-       opcode = eigrph->opcode;
        seqno = ntohl(eigrph->sequence);
        ack = ntohl(eigrph->ack);
        if (ep->nbr && (ack != ep->nbr->recv_sequence_number)) {
@@ -427,9 +425,8 @@ int eigrp_write(struct thread *thread)
 
        if (IS_DEBUG_EIGRP_TRANSMIT(0, SEND)) {
                eigrph = (struct eigrp_header *)STREAM_DATA(ep->s);
-               opcode = eigrph->opcode;
                zlog_debug("Sending [%s][%d/%d] to [%s] via [%s] ret [%d].",
-                          lookup_msg(eigrp_packet_type_str, opcode, NULL),
+                          lookup_msg(eigrp_packet_type_str, eigrph->opcode, NULL),
                           seqno, ack,
                           inet_ntoa(ep->dst), IF_NAME(ei), ret);
        }