]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Fix some various clang warnings 314/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 1 Apr 2017 12:42:19 +0000 (08:42 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 1 Apr 2017 12:42:19 +0000 (08:42 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd/isis_pfpacket.c
isisd/isis_spf.c

index 6ec7771ec2fd156bae48631292370dadbc3e1cc8..dd07a9c6f5758758178ce6a4c43167f7d7c0f96c 100644 (file)
@@ -279,6 +279,10 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa)
       bytesread = recvfrom (circuit->fd, discard_buff, sizeof (discard_buff),
                             MSG_DONTWAIT, (struct sockaddr *) &s_addr,
                             (socklen_t *) &addr_len);
+
+      if (bytesread < 0)
+        zlog_warn ("isis_recv_pdu_bcast(): recvfrom() failed");
+
       return ISIS_WARNING;
     }
   /*
@@ -322,10 +326,10 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa)
   addr_len = sizeof (s_addr);
 
   /* we can read directly to the stream */
-  bytesread = stream_recvfrom (circuit->rcv_stream, circuit->fd,
-                               circuit->interface->mtu, 0,
-                               (struct sockaddr *) &s_addr, 
-                               (socklen_t *) &addr_len);
+  stream_recvfrom (circuit->rcv_stream, circuit->fd,
+                   circuit->interface->mtu, 0,
+                   (struct sockaddr *) &s_addr,
+                   (socklen_t *) &addr_len);
 
   if (s_addr.sll_pkttype == PACKET_OUTGOING)
     {
index db46078f20c5ce06ed6c9d9f3752a3509ec56f83..554fa563ad774c201250d765f06a88b39e1f809b 100644 (file)
@@ -68,7 +68,6 @@ remove_excess_adjs (struct list *adjs)
       if (candidate->sys_type < adj->sys_type)
        {
          excess = node;
-         candidate = adj;
          continue;
        }
       if (candidate->sys_type > adj->sys_type)
@@ -78,7 +77,6 @@ remove_excess_adjs (struct list *adjs)
       if (comp > 0)
        {
          excess = node;
-         candidate = adj;
          continue;
        }
       if (comp < 0)
@@ -87,7 +85,6 @@ remove_excess_adjs (struct list *adjs)
       if (candidate->circuit->circuit_id > adj->circuit->circuit_id)
        {
          excess = node;
-         candidate = adj;
          continue;
        }
 
@@ -98,7 +95,6 @@ remove_excess_adjs (struct list *adjs)
       if (comp > 0)
        {
          excess = node;
-         candidate = adj;
          continue;
        }
     }