]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ripd] bug #278: remove gratuitous use of mid-function declaration
authorPaul Jakma <paul.jakma@sun.com>
Mon, 11 Sep 2006 02:10:40 +0000 (02:10 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Mon, 11 Sep 2006 02:10:40 +0000 (02:10 +0000)
2006-09-11 Paul Jakma <paul.jakma@sun.com>

* ripd.c: (rip_read) remove gratuitous use of mid-function
  declaration of vrecv, bug #278.

ripd/ChangeLog
ripd/ripd.c

index 50f8dfd7a3eddad7b839024e5dccf41713eb8481..afae7e9868f6ec02fc4c302b4c481b86241cea2f 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-11 Paul Jakma <paul.jakma@sun.com>
+
+       * ripd.c: (rip_read) remove gratuitous use of mid-function
+         declaration of vrecv, bug #278.
+
 2006-06-29 Paul Jakma <paul.jakma@sun.com>
 
        * rip_zebra: (general) convert redistribute commands to use
index 518e48616846989ede0b04fa7a1e3fae07c909b9..a1630f6ca6d28e5fb16cf2f725cf8e632bf94192 100644 (file)
@@ -1818,6 +1818,7 @@ rip_read (struct thread *t)
   struct rip_packet *packet;
   struct sockaddr_in from;
   int len;
+  int vrecv;
   socklen_t fromlen;
   struct interface *ifp;
   struct connected *ifc;
@@ -1937,8 +1938,8 @@ rip_read (struct thread *t)
     }
 
   /* RIP Version check. RFC2453, 4.6 and 5.1 */
-  int vrecv = ((ri->ri_receive == RI_RIP_UNSPEC) ?
-               rip->version_recv : ri->ri_receive);
+  vrecv = ((ri->ri_receive == RI_RIP_UNSPEC) ?
+           rip->version_recv : ri->ri_receive);
   if ((packet->version == RIPv1) && !(vrecv & RIPv1))
     {
       if (IS_RIP_DEBUG_PACKET)