Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mrouted ifa->ifa_addr is already pointer, no need f...



details:   https://anonhg.NetBSD.org/src/rev/7f708c1f0eaa
branches:  trunk
changeset: 534687:7f708c1f0eaa
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Aug 01 23:47:46 2002 +0000

description:
ifa->ifa_addr is already pointer, no need for "&".  from love

diffstat:

 usr.sbin/mrouted/config.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 58a73a5dbf57 -r 7f708c1f0eaa usr.sbin/mrouted/config.c
--- a/usr.sbin/mrouted/config.c Thu Aug 01 23:46:37 2002 +0000
+++ b/usr.sbin/mrouted/config.c Thu Aug 01 23:47:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.8 2002/08/01 14:04:50 itojun Exp $        */
+/*     $NetBSD: config.c,v 1.9 2002/08/01 23:47:46 itojun Exp $        */
 
 /*
  * The mrouted program is covered by the license in the accompanying file
@@ -37,7 +37,7 @@
        if (ifa->ifa_addr->sa_family != AF_INET)
            continue;
 
-       addr = ((struct sockaddr_in *)&ifa->ifa_addr)->sin_addr.s_addr;
+       addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
 
        /*
         * Ignore loopback interfaces and interfaces that do not support
@@ -52,7 +52,7 @@
         * valid subnet number, or whose address is of the form {subnet,0}
         * or {subnet,-1}.
         */
-       mask = ((struct sockaddr_in *)&ifa->ifa_netmask)->sin_addr.s_addr;
+       mask = ((struct sockaddr_in *)ifa->ifa_netmask)->sin_addr.s_addr;
        subnet = addr & mask;
        if (!inet_valid_subnet(subnet, mask) ||
            addr == subnet ||



Home | Main Index | Thread Index | Old Index