Author: bz
Date: Thu Oct 30 15:56:04 2008
New Revision: 184475
URL: http://svn.freebsd.org/changeset/base/184475

Log:
  MFC: r182106
  
  Make the checks for ptp interfaces in ifa_ifwithdstaddr() and
  ifa_ifwithnet() look more similar by comparing the pointer to NULL
  in both cases.
  
  Approved by:  re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/net/if.c

Modified: stable/7/sys/net/if.c
==============================================================================
--- stable/7/sys/net/if.c       Thu Oct 30 15:48:55 2008        (r184474)
+++ stable/7/sys/net/if.c       Thu Oct 30 15:56:04 2008        (r184475)
@@ -1172,7 +1172,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr)
                TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
                        if (ifa->ifa_addr->sa_family != addr->sa_family)
                                continue;
-                       if (ifa->ifa_dstaddr &&
+                       if (ifa->ifa_dstaddr != NULL &&
                            sa_equal(addr, ifa->ifa_dstaddr))
                                goto done;
                }
@@ -1226,7 +1226,7 @@ next:                             continue;
                                 * The trouble is that we don't know the
                                 * netmask for the remote end.
                                 */
-                               if (ifa->ifa_dstaddr != 0 &&
+                               if (ifa->ifa_dstaddr != NULL &&
                                    sa_equal(addr, ifa->ifa_dstaddr))
                                        goto done;
                        } else {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to