Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet - remove superfluous assignment



details:   https://anonhg.NetBSD.org/src/rev/bd7f473d1499
branches:  trunk
changeset: 566735:bd7f473d1499
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 18 21:47:45 2004 +0000

description:
- remove superfluous assignment
- rt_gateway is already a pointer to struct sockaddr; don't take its address
  when assigning it to struct sockaddr_in *

diffstat:

 sys/netinet/ip_fil_netbsd.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 5bf8810ae525 -r bd7f473d1499 sys/netinet/ip_fil_netbsd.c
--- a/sys/netinet/ip_fil_netbsd.c       Tue May 18 21:03:08 2004 +0000
+++ b/sys/netinet/ip_fil_netbsd.c       Tue May 18 21:47:45 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_fil_netbsd.c,v 1.8 2004/05/09 08:29:30 taca Exp $   */
+/*     $NetBSD: ip_fil_netbsd.c,v 1.9 2004/05/18 21:47:45 christos Exp $       */
 
 /*
  * Copyright (C) 1993-2003 by Darren Reed.
@@ -1043,7 +1043,6 @@
        if ((fr != NULL) && (fin->fin_rev != 0)) {
                if ((ifp != NULL) && (fdp == &fr->fr_tif))
                        return -1;
-               dst->sin_addr = ip->ip_dst;
        } else if (fdp != NULL) {
                if (fdp->fd_ip.s_addr != 0)
                        dst->sin_addr = fdp->fd_ip;
@@ -1063,7 +1062,7 @@
                goto bad;
        }
        if (ro->ro_rt->rt_flags & RTF_GATEWAY)
-               dst = (struct sockaddr_in *)&ro->ro_rt->rt_gateway;
+               dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway;
        if (ro->ro_rt)
                ro->ro_rt->rt_use++;
 



Home | Main Index | Thread Index | Old Index