diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-09-11 02:10:40 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-09-11 02:10:40 +0000 |
commit | 3e557ae1ea7693d91b6df42c2529952d6a349911 (patch) | |
tree | 16edc7c42b662c852158ed802fda2f9200be3308 | |
parent | 1a392d46db1917dfca2ddd06d7f0021396f8ecfa (diff) |
[ripd] bug #278: remove gratuitous use of mid-function declaration
2006-09-11 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (rip_read) remove gratuitous use of mid-function
declaration of vrecv, bug #278.
-rw-r--r-- | ripd/ChangeLog | 5 | ||||
-rw-r--r-- | ripd/ripd.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog index 50f8dfd7..afae7e98 100644 --- a/ripd/ChangeLog +++ b/ripd/ChangeLog @@ -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 diff --git a/ripd/ripd.c b/ripd/ripd.c index 518e4861..a1630f6c 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -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) |