PERFORCE change 49436 for review

Marcel Moolenaar marcel at FreeBSD.org
Sat Mar 20 21:19:05 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=49436

Change 49436 by marcel at marcel_nfs on 2004/03/20 21:18:38

	IFC @49435

Affected files ...

.. //depot/projects/gdb/sys/conf/kern.pre.mk#5 integrate
.. //depot/projects/gdb/sys/netatalk/at_control.c#2 integrate
.. //depot/projects/gdb/sys/netatalk/ddp_input.c#2 integrate
.. //depot/projects/gdb/sys/netatalk/ddp_output.c#2 integrate
.. //depot/projects/gdb/sys/netatalk/ddp_pcb.c#2 integrate

Differences ...

==== //depot/projects/gdb/sys/conf/kern.pre.mk#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.47 2004/03/19 17:40:45 obrien Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.48 2004/03/21 05:10:34 marcel Exp $
 
 # Part of a unified Makefile for building kernels.  This part contains all
 # of the definitions that need to be before %BEFORE_DEPEND.
@@ -21,6 +21,8 @@
 .else
 . if ${MACHINE_ARCH} == "amd64"
 COPTFLAGS?=-O2 -frename-registers -pipe
+. elif ${MACHINE_ARCH} == "ia64"
+COPTFLAGS?=-O2 -pipe
 . else
 COPTFLAGS?=-O -pipe
 . endif

==== //depot/projects/gdb/sys/netatalk/at_control.c#2 (text+ko) ====

@@ -2,7 +2,7 @@
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
- * $FreeBSD: src/sys/netatalk/at_control.c,v 1.35 2003/11/28 04:19:41 sam Exp $
+ * $FreeBSD: src/sys/netatalk/at_control.c,v 1.36 2004/03/21 03:28:08 rwatson Exp $
  */
 
 #include <sys/param.h>
@@ -50,7 +50,7 @@
     struct netrange	*nr;
     struct at_aliasreq	*ifra = (struct at_aliasreq *)data;
     struct at_ifaddr	*aa0;
-    struct at_ifaddr	*aa = 0;
+    struct at_ifaddr	*aa = NULL;
     struct ifaddr	*ifa, *ifa0;
 
     /*
@@ -90,7 +90,7 @@
 	 * If we a retrying to delete an addres but didn't find such,
 	 * then rewurn with an error
 	 */
-	if ( cmd == SIOCDIFADDR && aa == 0 ) {
+	if ( cmd == SIOCDIFADDR && aa == NULL ) {
 	    return( EADDRNOTAVAIL );
 	}
 	/*FALLTHROUGH*/
@@ -130,14 +130,14 @@
 	    }
 	}
 
-	if ( ifp == 0 )
+	if ( ifp == NULL )
 	    panic( "at_control" );
 
 	/*
 	 * If we failed to find an existing at_ifaddr entry, then we 
 	 * allocate a fresh one. 
 	 */
-	if ( aa == (struct at_ifaddr *) 0 ) {
+	if ( aa == NULL ) {
 	    aa0 = malloc(sizeof(struct at_ifaddr), M_IFADDR, M_WAITOK | M_ZERO);
 	    if (( aa = at_ifaddr ) != NULL ) {
 		/*
@@ -224,7 +224,7 @@
 	    }
 	}
 
-	if ( aa == (struct at_ifaddr *) 0 )
+	if ( aa == NULL )
 	    return( EADDRNOTAVAIL );
 	break;
     }
@@ -301,7 +301,7 @@
 	break;
 
     default:
-	if ( ifp == 0 || ifp->if_ioctl == 0 )
+	if ( ifp == NULL || ifp->if_ioctl == NULL )
 	    return( EOPNOTSUPP );
 	return( (*ifp->if_ioctl)( ifp, cmd, data ));
     }

==== //depot/projects/gdb/sys/netatalk/ddp_input.c#2 (text+ko) ====

@@ -2,7 +2,7 @@
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  *
- * $FreeBSD: src/sys/netatalk/ddp_input.c,v 1.19 2003/11/08 22:28:39 sam Exp $
+ * $FreeBSD: src/sys/netatalk/ddp_input.c,v 1.20 2004/03/21 03:28:08 rwatson Exp $
  */
 
 #include "opt_mac.h"
@@ -56,7 +56,7 @@
 	/*
 	 * Phase 1 packet handling 
 	 */
-	if (m->m_len < SZ_ELAPHDR && ((m = m_pullup(m, SZ_ELAPHDR)) == 0)) {
+	if (m->m_len < SZ_ELAPHDR && ((m = m_pullup(m, SZ_ELAPHDR)) == NULL)) {
 		ddpstat.ddps_tooshort++;
 		return;
 	}
@@ -105,7 +105,7 @@
 	ddpstat.ddps_short++;
 
 	if ( m->m_len < sizeof( struct ddpshdr ) &&
-		(( m = m_pullup( m, sizeof( struct ddpshdr ))) == 0 )) {
+		(( m = m_pullup( m, sizeof( struct ddpshdr ))) == NULL )) {
 	    ddpstat.ddps_tooshort++;
 	    return;
 	}
@@ -151,7 +151,7 @@
 	ddpstat.ddps_long++;
 
 	if ( m->m_len < sizeof( struct ddpehdr ) &&
-		(( m = m_pullup( m, sizeof( struct ddpehdr ))) == 0 )) {
+		(( m = m_pullup( m, sizeof( struct ddpehdr ))) == NULL )) {
 	    ddpstat.ddps_tooshort++;
 	    return;
 	}
@@ -280,7 +280,7 @@
 	&& ( satosat(&forwro.ro_dst)->sat_addr.s_net != to.sat_addr.s_net
 	  || satosat(&forwro.ro_dst)->sat_addr.s_node != to.sat_addr.s_node )) {
 	    RTFREE( forwro.ro_rt );
-	    forwro.ro_rt = (struct rtentry *)0;
+	    forwro.ro_rt = NULL;
 	}
 
 	/*
@@ -288,8 +288,7 @@
 	 * Then get a new route.
 	 * XXX this could cause a 'route leak'. check this!
 	 */
-	if ( forwro.ro_rt == (struct rtentry *)0
-	|| forwro.ro_rt->rt_ifp == (struct ifnet *)0 ) {
+	if ( forwro.ro_rt == NULL || forwro.ro_rt->rt_ifp == NULL ) {
 	    forwro.ro_dst.sa_len = sizeof( struct sockaddr_at );
 	    forwro.ro_dst.sa_family = AF_APPLETALK;
 	    satosat(&forwro.ro_dst)->sat_addr.s_net = to.sat_addr.s_net;
@@ -377,7 +376,7 @@
      * If we found one, deliver th epacket to the socket
      */
     if ( sbappendaddr( &ddp->ddp_socket->so_rcv, (struct sockaddr *)&from,
-	    m, (struct mbuf *)0 ) == 0 ) {
+	    m, NULL ) == 0 ) {
 	/* 
 	 * If the socket is full (or similar error) dump the packet.
 	 */

==== //depot/projects/gdb/sys/netatalk/ddp_output.c#2 (text+ko) ====

@@ -21,7 +21,7 @@
  *	netatalk at itd.umich.edu
  */
 
-/* $FreeBSD: src/sys/netatalk/ddp_output.c,v 1.20 2003/10/31 18:32:10 brooks Exp $ */
+/* $FreeBSD: src/sys/netatalk/ddp_output.c,v 1.21 2004/03/21 03:28:08 rwatson Exp $ */
 
 #include "opt_mac.h"
 
@@ -199,7 +199,7 @@
      */
     if ( !(aa->aa_flags & AFA_PHASE2) ) {
 	MGET( m0, M_TRYWAIT, MT_HEADER );
-	if ( m0 == 0 ) {
+	if ( m0 == NULL ) {
 	    m_freem( m );
 	    printf("ddp_route: no buffers\n");
 	    return( ENOBUFS );

==== //depot/projects/gdb/sys/netatalk/ddp_pcb.c#2 (text+ko) ====

@@ -2,7 +2,7 @@
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  *
- * $FreeBSD: src/sys/netatalk/ddp_pcb.c,v 1.37 2004/03/19 07:21:22 rwatson Exp $
+ * $FreeBSD: src/sys/netatalk/ddp_pcb.c,v 1.38 2004/03/21 03:28:08 rwatson Exp $
  */
 
 #include <sys/param.h>
@@ -42,7 +42,7 @@
 	return( EINVAL );
     }
 
-    if (addr != 0) {			/* validate passed address */
+    if (addr != NULL) {			/* validate passed address */
 	sat = (struct sockaddr_at *)addr;
 	if (sat->sat_family != AF_APPLETALK) {
 	    return(EAFNOSUPPORT);
@@ -95,7 +95,7 @@
     if ( sat->sat_port == ATADDR_ANYPORT ) {
 	for ( sat->sat_port = ATPORT_RESERVED;
 		sat->sat_port < ATPORT_LAST; sat->sat_port++ ) {
-	    if ( ddp_ports[ sat->sat_port - 1 ] == 0 ) {
+	    if ( ddp_ports[ sat->sat_port - 1 ] == NULL ) {
 		break;
 	    }
 	}
@@ -130,7 +130,7 @@
 {
     struct sockaddr_at	*sat = (struct sockaddr_at *)addr;
     struct route	*ro;
-    struct at_ifaddr	*aa = 0;
+    struct at_ifaddr	*aa = NULL;
     struct ifnet	*ifp;
     u_short		hintnet = 0, net;
 
@@ -163,7 +163,7 @@
 	} else {
 	    net = sat->sat_addr.s_net;
 	}
-	aa = 0;
+	aa = NULL;
 	if ((ifp = ro->ro_rt->rt_ifp) != NULL) {
 	    for ( aa = at_ifaddr; aa; aa = aa->aa_next ) {
 		if ( aa->aa_ifp == ifp &&
@@ -178,15 +178,14 @@
 		satosat( &ro->ro_dst )->sat_addr.s_node !=
 		sat->sat_addr.s_node )) {
 	    RTFREE( ro->ro_rt );
-	    ro->ro_rt = (struct rtentry *)0;
+	    ro->ro_rt = NULL;
 	}
     }
 
     /*
      * If we've got no route for this interface, try to find one.
      */
-    if ( ro->ro_rt == (struct rtentry *)0 ||
-	 ro->ro_rt->rt_ifp == (struct ifnet *)0 ) {
+    if ( ro->ro_rt == NULL || ro->ro_rt->rt_ifp == NULL ) {
 	ro->ro_dst.sa_len = sizeof( struct sockaddr_at );
 	ro->ro_dst.sa_family = AF_APPLETALK;
 	if ( hintnet ) {
@@ -201,7 +200,7 @@
     /*
      * Make sure any route that we have has a valid interface.
      */
-    aa = 0;
+    aa = NULL;
     if ( ro->ro_rt && ( ifp = ro->ro_rt->rt_ifp )) {
 	for ( aa = at_ifaddr; aa; aa = aa->aa_next ) {
 	    if ( aa->aa_ifp == ifp ) {
@@ -209,13 +208,13 @@
 	    }
 	}
     }
-    if ( aa == 0 ) {
+    if ( aa == NULL ) {
 	return( ENETUNREACH );
     }
 
     ddp->ddp_fsat = *sat;
     if ( ddp->ddp_lsat.sat_port == ATADDR_ANYPORT ) {
-	return(at_pcbsetaddr(ddp, (struct sockaddr *)0, td));
+	return(at_pcbsetaddr(ddp, NULL, td));
     }
     return( 0 );
 }
@@ -254,7 +253,7 @@
 at_pcbdetach( struct socket *so, struct ddpcb *ddp)
 {
     soisdisconnected( so );
-    so->so_pcb = 0;
+    so->so_pcb = NULL;
     sotryfree(so);
 
     /* remove ddp from ddp_ports list */


More information about the p4-projects mailing list