Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2017 02:06:04 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r315221 - in stable/11/sys: amd64/amd64 boot/common boot/efi/libefi boot/fdt boot/ficl boot/kshim boot/ofw/libofw boot/sparc64/loader boot/userboot/userboot boot/zfs dev/agp dev/an dev/...
Message-ID:  <201703140206.v2E264XL070870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Mar 14 02:06:03 2017
New Revision: 315221
URL: https://svnweb.freebsd.org/changeset/base/315221

Log:
  MFC r313982, r314068:
  sys: Replace zero with NULL for pointers.
  
  Found with:	devel/coccinelle

Modified:
  stable/11/sys/amd64/amd64/db_disasm.c
  stable/11/sys/amd64/amd64/pmap.c
  stable/11/sys/boot/common/md.c
  stable/11/sys/boot/efi/libefi/efinet.c
  stable/11/sys/boot/fdt/fdt_overlay.c
  stable/11/sys/boot/ficl/ficl.c
  stable/11/sys/boot/kshim/bsd_kernel.c
  stable/11/sys/boot/ofw/libofw/ofw_memory.c
  stable/11/sys/boot/sparc64/loader/main.c
  stable/11/sys/boot/userboot/userboot/userboot_disk.c
  stable/11/sys/boot/zfs/zfs.c
  stable/11/sys/boot/zfs/zfsimpl.c
  stable/11/sys/dev/agp/agp.c
  stable/11/sys/dev/an/if_an.c
  stable/11/sys/dev/arcmsr/arcmsr.c
  stable/11/sys/dev/bce/if_bce.c
  stable/11/sys/dev/beri/virtio/virtio_block.c
  stable/11/sys/dev/buslogic/bt_pci.c
  stable/11/sys/dev/ce/if_ce.c
  stable/11/sys/dev/cm/smc90cx6.c
  stable/11/sys/dev/cp/if_cp.c
  stable/11/sys/dev/ctau/ctddk.c
  stable/11/sys/dev/ctau/if_ct.c
  stable/11/sys/dev/cx/cxddk.c
  stable/11/sys/dev/cx/if_cx.c
  stable/11/sys/dev/de/if_de.c
  stable/11/sys/dev/ed/if_ed.c
  stable/11/sys/dev/fatm/if_fatm.c
  stable/11/sys/dev/fe/if_fe.c
  stable/11/sys/dev/firewire/if_fwip.c
  stable/11/sys/dev/hptiop/hptiop.c
  stable/11/sys/dev/hptmv/entry.c
  stable/11/sys/dev/hptmv/gui_lib.c
  stable/11/sys/dev/hptmv/hptproc.c
  stable/11/sys/dev/hptmv/ioctl.c
  stable/11/sys/dev/iicbus/if_ic.c
  stable/11/sys/dev/isp/isp_pci.c
  stable/11/sys/dev/le/am7990.c
  stable/11/sys/dev/le/am79900.c
  stable/11/sys/dev/le/lance.c
  stable/11/sys/dev/md/md.c
  stable/11/sys/dev/ncr/ncr.c
  stable/11/sys/dev/ofw/ofw_bus_subr.c
  stable/11/sys/dev/patm/if_patm_tx.c
  stable/11/sys/dev/pccard/pccard.c
  stable/11/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c
  stable/11/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c
  stable/11/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
  stable/11/sys/dev/ppbus/if_plip.c
  stable/11/sys/dev/ppbus/ppbconf.c
  stable/11/sys/dev/ppc/ppc.c
  stable/11/sys/dev/sbni/if_sbni_isa.c
  stable/11/sys/dev/sn/if_sn.c
  stable/11/sys/dev/sym/sym_hipd.c
  stable/11/sys/dev/vx/if_vx.c
  stable/11/sys/libkern/iconv_xlat16.c
  stable/11/sys/net/if_fddisubr.c
  stable/11/sys/net/if_iso88025subr.c
  stable/11/sys/net/iflib.c
  stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/db_disasm.c
==============================================================================
--- stable/11/sys/amd64/amd64/db_disasm.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/amd64/amd64/db_disasm.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -1044,7 +1044,7 @@ db_read_address(loc, short_addr, rex, re
 	    return (loc);
 	}
 	addrp->is_reg = FALSE;
-	addrp->index = 0;
+	addrp->index = NULL;
 
 	if (short_addr)
 	    size = LONG;
@@ -1067,7 +1067,7 @@ db_read_address(loc, short_addr, rex, re
 		if (rm == 5) {
 		    get_value_inc(addrp->disp, loc, 4, FALSE);
 		    if (have_sib)
-			addrp->base = 0;
+			addrp->base = NULL;
 		    else if (short_addr)
 			addrp->base = "%eip";
 		    else
@@ -1109,9 +1109,9 @@ db_print_address(seg, size, rex, addrp)
 	    db_printf("%s:", seg);
 	}
 
-	if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0))
+	if (addrp->disp != 0 || (addrp->base == NULL && addrp->index == NULL))
 		db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY);
-	if (addrp->base != 0 || addrp->index != 0) {
+	if (addrp->base != NULL || addrp->index != NULL) {
 	    db_printf("(");
 	    if (addrp->base)
 		db_printf("%s", addrp->base);
@@ -1248,7 +1248,7 @@ db_disasm(db_addr_t loc, bool altfmt)
 	get_value_inc(inst, loc, 1, FALSE);
 	short_addr = FALSE;
 	size = LONG;
-	seg = 0;
+	seg = NULL;
 
 	/*
 	 * Get prefixes
@@ -1313,7 +1313,7 @@ db_disasm(db_addr_t loc, bool altfmt)
 	while (ip->i_size == ESC) {
 	    get_value_inc(inst, loc, 1, FALSE);
 	    ip = ((const struct inst * const *)ip->i_extra)[inst>>4];
-	    if (ip == 0) {
+	    if (ip == NULL) {
 		ip = &db_bad_inst;
 	    }
 	    else {

Modified: stable/11/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/11/sys/amd64/amd64/pmap.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/amd64/amd64/pmap.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -391,7 +391,7 @@ static struct md_page pv_dummy;
 /*
  * All those kernel PT submaps that BSD is so fond of
  */
-pt_entry_t *CMAP1 = 0;
+pt_entry_t *CMAP1 = NULL;
 caddr_t CADDR1 = 0;
 static vm_offset_t qframe = 0;
 static struct mtx qframe_mtx;

Modified: stable/11/sys/boot/common/md.c
==============================================================================
--- stable/11/sys/boot/common/md.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/common/md.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -103,7 +103,7 @@ md_strategy(void *devdata, int rw, daddr
 	if ((ofs + size) > MD_IMAGE_SIZE)
 		size = MD_IMAGE_SIZE - ofs;
 
-	if (rsize != 0)
+	if (rsize != NULL)
 		*rsize = size;
 
 	switch (rw) {

Modified: stable/11/sys/boot/efi/libefi/efinet.c
==============================================================================
--- stable/11/sys/boot/efi/libefi/efinet.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/efi/libefi/efinet.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -131,13 +131,13 @@ efinet_put(struct iodesc *desc, void *pk
 
 	/* Wait for the buffer to be transmitted */
 	do {
-		buf = 0;	/* XXX Is this needed? */
+		buf = NULL;	/* XXX Is this needed? */
 		status = net->GetStatus(net, 0, &buf);
 		/*
 		 * XXX EFI1.1 and the E1000 card returns a different 
 		 * address than we gave.  Sigh.
 		 */
-	} while (status == EFI_SUCCESS && buf == 0);
+	} while (status == EFI_SUCCESS && buf == NULL);
 
 	/* XXX How do we deal with status != EFI_SUCCESS now? */
 	return ((status == EFI_SUCCESS) ? len : -1);

Modified: stable/11/sys/boot/fdt/fdt_overlay.c
==============================================================================
--- stable/11/sys/boot/fdt/fdt_overlay.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/fdt/fdt_overlay.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -64,7 +64,7 @@ fdt_get_fixup_location(void *fdtp, const
 	int prop_offset, o, proplen;
 	void  *result;
 
-	result = 0;
+	result = NULL;
 
 	path = strdup(fixup);
 	prop = strchr(path, ':');

Modified: stable/11/sys/boot/ficl/ficl.c
==============================================================================
--- stable/11/sys/boot/ficl/ficl.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/ficl/ficl.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -276,7 +276,7 @@ void ficlFreeVM(FICL_VM *pVM)
     FICL_SYSTEM *pSys = pVM->pSys;
     FICL_VM *pList = pSys->vmList;
 
-    assert(pVM != 0);
+    assert(pVM != NULL);
 
     if (pSys->vmList == pVM)
     {

Modified: stable/11/sys/boot/kshim/bsd_kernel.c
==============================================================================
--- stable/11/sys/boot/kshim/bsd_kernel.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/kshim/bsd_kernel.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -75,7 +75,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 	void *addr;
 
 	addr = malloc(dmat->maxsize + dmat->alignment, XXX, XXX);
-	if (addr == 0)
+	if (addr == NULL)
 		return (ENOMEM);
 
 	*mapp = addr;

Modified: stable/11/sys/boot/ofw/libofw/ofw_memory.c
==============================================================================
--- stable/11/sys/boot/ofw/libofw/ofw_memory.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/ofw/libofw/ofw_memory.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
 #include "libofw.h"
 #include "openfirm.h"
 
-static void		*heap_base = 0;
+static void		*heap_base = NULL;
 static unsigned int	heap_size = 0;
 
 struct ofw_mapping {

Modified: stable/11/sys/boot/sparc64/loader/main.c
==============================================================================
--- stable/11/sys/boot/sparc64/loader/main.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/sparc64/loader/main.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -859,7 +859,7 @@ main(int (*openfirm)(void *))
 	/*
 	 * Initialize devices.
 	 */
-	for (dp = devsw; *dp != 0; dp++)
+	for (dp = devsw; *dp != NULL; dp++)
 		if ((*dp)->dv_init != 0)
 			(*dp)->dv_init();
 

Modified: stable/11/sys/boot/userboot/userboot/userboot_disk.c
==============================================================================
--- stable/11/sys/boot/userboot/userboot/userboot_disk.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/userboot/userboot/userboot_disk.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -91,8 +91,8 @@ userdisk_init(void)
 			return (ENOMEM);
 		for (i = 0; i < userdisk_maxunit; i++) {
 			if (CALLBACK(diskioctl, i, DIOCGSECTORSIZE,
-			    &sectorsize) != 0 || CALLBACK(diskioctl, i,
-			    DIOCGMEDIASIZE, &mediasize) != 0)
+			    &sectorsize) != NULL || CALLBACK(diskioctl, i,
+			    DIOCGMEDIASIZE, &mediasize) != NULL)
 				return (ENXIO);
 			ud_info[i].mediasize = mediasize;
 			ud_info[i].sectorsize = sectorsize;

Modified: stable/11/sys/boot/zfs/zfs.c
==============================================================================
--- stable/11/sys/boot/zfs/zfs.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/zfs/zfs.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -126,7 +126,7 @@ zfs_close(struct open_file *f)
 {
 	struct file *fp = (struct file *)f->f_fsdata;
 
-	dnode_cache_obj = 0;
+	dnode_cache_obj = NULL;
 	f->f_fsdata = (void *)0;
 	if (fp == (struct file *)0)
 		return (0);

Modified: stable/11/sys/boot/zfs/zfsimpl.c
==============================================================================
--- stable/11/sys/boot/zfs/zfsimpl.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/boot/zfs/zfsimpl.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -67,7 +67,7 @@ static const char *features_for_read[] =
 static spa_list_t zfs_pools;
 
 static uint64_t zfs_crc64_table[256];
-static const dnode_phys_t *dnode_cache_obj = 0;
+static const dnode_phys_t *dnode_cache_obj = NULL;
 static uint64_t dnode_cache_bn;
 static char *dnode_cache_buf;
 static char *zap_scratch;
@@ -1430,7 +1430,7 @@ fzap_lookup(const spa_t *spa, const dnod
 	zc = &ZAP_LEAF_CHUNK(&zl, h);
 	while (zc->l_entry.le_hash != hash) {
 		if (zc->l_entry.le_next == 0xffff) {
-			zc = 0;
+			zc = NULL;
 			break;
 		}
 		zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next);
@@ -2127,7 +2127,7 @@ zfs_lookup(const struct zfsmount *mount,
 			p = q;
 		} else {
 			strcpy(element, p);
-			p = 0;
+			p = NULL;
 		}
 
 		rc = zfs_dnode_stat(spa, &dn, &sb);

Modified: stable/11/sys/dev/agp/agp.c
==============================================================================
--- stable/11/sys/dev/agp/agp.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/agp/agp.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -820,7 +820,7 @@ agp_close(struct cdev *kdev, int fflag, 
 	/*
 	 * Clear the GATT and force release on last close
 	 */
-	while ((mem = TAILQ_FIRST(&sc->as_memory)) != 0) {
+	while ((mem = TAILQ_FIRST(&sc->as_memory)) != NULL) {
 		if (mem->am_is_bound)
 			AGP_UNBIND_MEMORY(dev, mem);
 		AGP_FREE_MEMORY(dev, mem);

Modified: stable/11/sys/dev/an/if_an.c
==============================================================================
--- stable/11/sys/dev/an/if_an.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/an/if_an.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -3057,7 +3057,7 @@ static void
 an_cache_store(struct an_softc *sc, struct ether_header *eh, struct mbuf *m,
     u_int8_t rx_rssi, u_int8_t rx_quality)
 {
-	struct ip *ip = 0;
+	struct ip *ip = NULL;
 	int i;
 	static int cache_slot = 0; 	/* use this cache entry */
 	static int wrapindex = 0;	/* next "free" cache entry */

Modified: stable/11/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/11/sys/dev/arcmsr/arcmsr.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/arcmsr/arcmsr.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -1398,8 +1398,8 @@ static u_int32_t arcmsr_Read_iop_rqbuffe
 	struct QBUFFER *prbuffer) {
 
 	u_int8_t *pQbuffer;
-	u_int8_t *buf1 = 0;
-	u_int32_t *iop_data, *buf2 = 0;
+	u_int8_t *buf1 = NULL;
+	u_int32_t *iop_data, *buf2 = NULL;
 	u_int32_t iop_len, data_len;
 
 	iop_data = (u_int32_t *)prbuffer->data;
@@ -1494,8 +1494,8 @@ static void arcmsr_Write_data_2iop_wqbuf
 {
 	u_int8_t *pQbuffer;
 	struct QBUFFER *pwbuffer;
-	u_int8_t *buf1 = 0;
-	u_int32_t *iop_data, *buf2 = 0;
+	u_int8_t *buf1 = NULL;
+	u_int32_t *iop_data, *buf2 = NULL;
 	u_int32_t allxfer_len = 0, data_len;
 
 	if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) {

Modified: stable/11/sys/dev/bce/if_bce.c
==============================================================================
--- stable/11/sys/dev/bce/if_bce.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/bce/if_bce.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -2800,7 +2800,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 
 	if (align_start || align_end) {
 		buf = malloc(len32, M_DEVBUF, M_NOWAIT);
-		if (buf == 0) {
+		if (buf == NULL) {
 			rc = ENOMEM;
 			goto bce_nvram_write_exit;
 		}

Modified: stable/11/sys/dev/beri/virtio/virtio_block.c
==============================================================================
--- stable/11/sys/dev/beri/virtio/virtio_block.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/beri/virtio/virtio_block.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -457,7 +457,7 @@ beri_ioctl(struct cdev *dev, u_long cmd,
 		sc->opened = 1;
 		break;
 	case MDIOCDETACH:
-		if (sc->vnode == 0) {
+		if (sc->vnode == NULL) {
 			/* File not opened */
 			return (1);
 		}

Modified: stable/11/sys/dev/buslogic/bt_pci.c
==============================================================================
--- stable/11/sys/dev/buslogic/bt_pci.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/buslogic/bt_pci.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -58,8 +58,8 @@ static int
 bt_pci_alloc_resources(device_t dev)
 {
 	int		type = 0, rid, zero;
-	struct resource *regs = 0;
-	struct resource *irq = 0;
+	struct resource *regs = NULL;
+	struct resource *irq = NULL;
 
 #if 0
 	/* XXX Memory Mapped I/O seems to cause problems */

Modified: stable/11/sys/dev/ce/if_ce.c
==============================================================================
--- stable/11/sys/dev/ce/if_ce.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ce/if_ce.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -840,11 +840,11 @@ static int ce_detach (device_t dev)
 		if (! d || ! d->chan)
 			continue;
 		callout_drain (&d->timeout_handle);
-		channel [b->num * NCHAN + c->num] = 0;
+		channel [b->num * NCHAN + c->num] = NULL;
 		/* Deallocate buffers. */
 		ce_bus_dma_mem_free (&d->dmamem);
 	}
-	adapter [b->num] = 0;
+	adapter [b->num] = NULL;
 	ce_bus_dma_mem_free (&bd->dmamem);
 	free (b, M_DEVBUF);
 #if __FreeBSD_version >= 504000

Modified: stable/11/sys/dev/cm/smc90cx6.c
==============================================================================
--- stable/11/sys/dev/cm/smc90cx6.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/cm/smc90cx6.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -373,7 +373,7 @@ cm_start_locked(ifp)
 	m = arc_frag_next(ifp);
 	buffer = sc->sc_tx_act ^ 1;
 
-	if (m == 0)
+	if (m == NULL)
 		return;
 
 #ifdef CM_DEBUG
@@ -388,7 +388,7 @@ cm_start_locked(ifp)
 #endif
 	cm_ram_ptr = buffer * 512;
 
-	if (m == 0)
+	if (m == NULL)
 		return;
 
 	/* write the addresses to RAM and throw them away */
@@ -505,7 +505,7 @@ cm_srint_locked(vsc)
 	/* Allocate header mbuf */
 	MGETHDR(m, M_NOWAIT, MT_DATA);
 
-	if (m == 0) {
+	if (m == NULL) {
 		/*
 		 * in case s.th. goes wrong with mem, drop it
 		 * to make sure the receiver can be started again
@@ -546,7 +546,7 @@ cm_srint_locked(vsc)
 		}
 	}
 
-	if (m == 0) {
+	if (m == NULL) {
 		if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
 		goto cleanup;
 	}

Modified: stable/11/sys/dev/cp/if_cp.c
==============================================================================
--- stable/11/sys/dev/cp/if_cp.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/cp/if_cp.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -628,11 +628,11 @@ static int cp_detach (device_t dev)
 		if (! d || ! d->chan->type)
 			continue;
 		callout_drain (&d->timeout_handle);
-		channel [b->num*NCHAN + c->num] = 0;
+		channel [b->num*NCHAN + c->num] = NULL;
 		/* Deallocate buffers. */
 		cp_bus_dma_mem_free (&d->dmamem);
 	}
-	adapter [b->num] = 0;
+	adapter [b->num] = NULL;
 	cp_bus_dma_mem_free (&bd->dmamem);
 	free (b, M_DEVBUF);
 	mtx_destroy (&bd->cp_mtx);

Modified: stable/11/sys/dev/ctau/ctddk.c
==============================================================================
--- stable/11/sys/dev/ctau/ctddk.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ctau/ctddk.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -104,7 +104,7 @@ int ct_open_board (ct_board_t *b, int nu
 	case B_TAU2_E1D:
 		fw = ctau2_fw_data;
 		flen = 0;
-		ft = 0;
+		ft = NULL;
 		break;
 #ifndef CT_DDK_NO_G703
 	case B_TAU_G703:

Modified: stable/11/sys/dev/ctau/if_ct.c
==============================================================================
--- stable/11/sys/dev/ctau/if_ct.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ctau/if_ct.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -839,8 +839,8 @@ static int ct_detach (device_t dev)
 		/* Deallocate buffers. */
 		ct_bus_dma_mem_free (&d->dmamem);
 	}
-	bd->board = 0;
-	adapter [b->num] = 0;
+	bd->board = NULL;
+	adapter [b->num] = NULL;
 	free (b, M_DEVBUF);
 	
 	mtx_destroy (&bd->ct_mtx);

Modified: stable/11/sys/dev/cx/cxddk.c
==============================================================================
--- stable/11/sys/dev/cx/cxddk.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/cx/cxddk.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -440,7 +440,7 @@ static int cx_receive_interrupt (cx_chan
 	if (c->mode == M_ASYNC && (risr & RISA_TIMEOUT)) {
 		unsigned long rcbadr = (unsigned short) inw (RCBADRL(c->port)) |
 			(long) inw (RCBADRU(c->port)) << 16;
-		unsigned char *buf = 0;
+		unsigned char *buf = NULL;
 		port_t cnt_port = 0, sts_port = 0;
 
 		if (rcbadr >= c->brphys && rcbadr < c->brphys+DMABUFSZ) {

Modified: stable/11/sys/dev/cx/if_cx.c
==============================================================================
--- stable/11/sys/dev/cx/if_cx.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/cx/if_cx.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -991,8 +991,8 @@ static int cx_detach (device_t dev)
 		/* Deallocate buffers. */
 		cx_bus_dma_mem_free (&d->dmamem);
 	}
-	bd->board = 0;
-	adapter [b->num] = 0;
+	bd->board = NULL;
+	adapter [b->num] = NULL;
 	free (b, M_DEVBUF);
 	splx (s);
 

Modified: stable/11/sys/dev/de/if_de.c
==============================================================================
--- stable/11/sys/dev/de/if_de.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/de/if_de.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -4887,8 +4887,8 @@ tulip_pci_attach(device_t dev)
 	    rid = 0;
 	    res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
 					 RF_SHAREABLE | RF_ACTIVE);
-	    if (res == 0 || bus_setup_intr(dev, res, INTR_TYPE_NET |
-		    INTR_MPSAFE, NULL, intr_rtn, sc, &ih)) {
+	    if (res == NULL || bus_setup_intr(dev, res, INTR_TYPE_NET |
+                                              INTR_MPSAFE, NULL, intr_rtn, sc, &ih)) {
 		device_printf(dev, "couldn't map interrupt\n");
 		tulip_busdma_cleanup(sc);
 		ether_ifdetach(sc->tulip_ifp);

Modified: stable/11/sys/dev/ed/if_ed.c
==============================================================================
--- stable/11/sys/dev/ed/if_ed.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ed/if_ed.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -751,7 +751,7 @@ outloop:
 		return;
 	}
 	IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
-	if (m == 0) {
+	if (m == NULL) {
 
 		/*
 		 * We are using the !OACTIVE flag to indicate to the outside

Modified: stable/11/sys/dev/fatm/if_fatm.c
==============================================================================
--- stable/11/sys/dev/fatm/if_fatm.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/fatm/if_fatm.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -1501,7 +1501,7 @@ fatm_intr_drain_rx(struct fatm_softc *sc
 
 		rpd->nseg = le32toh(rpd->nseg);
 		mlen = 0;
-		m0 = last = 0;
+		m0 = last = NULL;
 		for (i = 0; i < rpd->nseg; i++) {
 			rb = sc->rbufs + rpd->segment[i].handle;
 			if (m0 == NULL) {

Modified: stable/11/sys/dev/fe/if_fe.c
==============================================================================
--- stable/11/sys/dev/fe/if_fe.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/fe/if_fe.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -2011,7 +2011,7 @@ fe_write_mbufs (struct fe_softc *sc, str
 	if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE)
 	{
 		/* 8-bit cards are easy.  */
-		for (mp = m; mp != 0; mp = mp->m_next) {
+		for (mp = m; mp != NULL; mp = mp->m_next) {
 			if (mp->m_len)
 				fe_outsb(sc, FE_BMPR8, mtod(mp, caddr_t),
 					 mp->m_len);
@@ -2021,7 +2021,7 @@ fe_write_mbufs (struct fe_softc *sc, str
 	{
 		/* 16-bit cards are a pain.  */
 		savebyte = NO_PENDING_BYTE;
-		for (mp = m; mp != 0; mp = mp->m_next) {
+		for (mp = m; mp != NULL; mp = mp->m_next) {
 
 			/* Ignore empty mbuf.  */
 			len = mp->m_len;

Modified: stable/11/sys/dev/firewire/if_fwip.c
==============================================================================
--- stable/11/sys/dev/firewire/if_fwip.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/firewire/if_fwip.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -575,7 +575,7 @@ fwip_async_output(struct fwip_softc *fwi
 		 */
 		mtag = m_tag_locate(m, MTAG_FIREWIRE, MTAG_FIREWIRE_HWADDR, 0);
 		if (mtag == NULL)
-			destfw = 0;
+			destfw = NULL;
 		else
 			destfw = (struct fw_hwaddr *) (mtag + 1);
 

Modified: stable/11/sys/dev/hptiop/hptiop.c
==============================================================================
--- stable/11/sys/dev/hptiop/hptiop.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/hptiop/hptiop.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -330,7 +330,7 @@ static void hptiop_request_callback_itl(
 							u_int32_t index)
 {
 	struct hpt_iop_srb *srb;
-	struct hpt_iop_request_scsi_command *req=0;
+	struct hpt_iop_request_scsi_command *req=NULL;
 	union ccb *ccb;
 	u_int8_t *cdb;
 	u_int32_t result, temp, dxfer;

Modified: stable/11/sys/dev/hptmv/entry.c
==============================================================================
--- stable/11/sys/dev/hptmv/entry.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/hptmv/entry.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -138,8 +138,8 @@ static MV_BOOLEAN hptmv_event_notify(MV_
 
 static struct sx hptmv_list_lock;
 SX_SYSINIT(hptmv_list_lock, &hptmv_list_lock, "hptmv list");
-IAL_ADAPTER_T *gIal_Adapter = 0;
-IAL_ADAPTER_T *pCurAdapter = 0;
+IAL_ADAPTER_T *gIal_Adapter = NULL;
+IAL_ADAPTER_T *pCurAdapter = NULL;
 static MV_SATA_CHANNEL gMvSataChannels[MAX_VBUS][MV_SATA_CHANNELS_NUM];
 
 typedef struct st_HPT_DPC {
@@ -1262,7 +1262,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter)
 	sx_xlock(&hptmv_list_lock);
 	pAdapter->next = 0;
 
-	if(gIal_Adapter == 0){
+	if(gIal_Adapter == NULL){
 		gIal_Adapter = pAdapter;
 		pCurAdapter = gIal_Adapter;
 	}
@@ -2427,7 +2427,7 @@ static void hpt_worker_thread(void)
 				sx_slock(&hptmv_list_lock);
 				pAdapter = gIal_Adapter;
 
-				while(pAdapter != 0){
+				while(pAdapter != NULL){
 					mtx_lock(&pAdapter->lock);
 					_vbus_p = &pAdapter->VBus;
 

Modified: stable/11/sys/dev/hptmv/gui_lib.c
==============================================================================
--- stable/11/sys/dev/hptmv/gui_lib.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/hptmv/gui_lib.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -74,7 +74,7 @@ check_VDevice_valid(PVDevice p)
 	PVBus    _vbus_p;
 	IAL_ADAPTER_T *pAdapter = gIal_Adapter;
 	
-	while(pAdapter != 0)
+	while(pAdapter != NULL)
 	{
 		for (i = 0; i < MV_SATA_CHANNELS_NUM; i++)
 			if(&(pAdapter->VDevices[i]) == p)  return 0;
@@ -83,7 +83,7 @@ check_VDevice_valid(PVDevice p)
 
 #ifdef SUPPORT_ARRAY
 	pAdapter = gIal_Adapter;
-	while(pAdapter != 0)
+	while(pAdapter != NULL)
 	{
 		_vbus_p = &pAdapter->VBus;
 		for (i=0;i<MAX_ARRAY_PER_VBUS;i++) 
@@ -403,7 +403,7 @@ int hpt_get_controller_count(void)
 	IAL_ADAPTER_T    *pAdapTemp = gIal_Adapter;
 	int iControllerCount = 0;
 	
-	while(pAdapTemp != 0)
+	while(pAdapTemp != NULL)
 	{		 
 		iControllerCount++;
 		pAdapTemp = pAdapTemp->next;
@@ -448,7 +448,7 @@ int hpt_get_channel_info(int id, int bus
 	IAL_ADAPTER_T    *pAdapTemp = gIal_Adapter;
 	int i,iControllerCount = 0;
 
-	while(pAdapTemp != 0)
+	while(pAdapTemp != NULL)
 	{
 		if (iControllerCount++==id) 
 			goto found;

Modified: stable/11/sys/dev/hptmv/hptproc.c
==============================================================================
--- stable/11/sys/dev/hptmv/hptproc.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/hptmv/hptproc.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -427,7 +427,7 @@ static void
 hpt_copy_array_info(HPT_GET_INFO *pinfo, int nld, PVDevice pArray)
 {
 	int i;
-	char *sType=0, *sStatus=0;
+	char *sType = NULL, *sStatus = NULL;
 	char buf[32];
     PVDevice pTmpArray;
 

Modified: stable/11/sys/dev/hptmv/ioctl.c
==============================================================================
--- stable/11/sys/dev/hptmv/ioctl.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/hptmv/ioctl.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -691,7 +691,7 @@ hpt_rebuild_data_block(IAL_ADAPTER_T *pA
     PCommand pCmd;
 	UINT result;
 	int needsync=0, retry=0, needdelete=0;
-	void *buffer = 0;
+	void *buffer = NULL;
 
 	_VBUS_INST(&pAdapter->VBus)
 

Modified: stable/11/sys/dev/iicbus/if_ic.c
==============================================================================
--- stable/11/sys/dev/iicbus/if_ic.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/iicbus/if_ic.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -251,7 +251,7 @@ icioctl(struct ifnet *ifp, u_long cmd, c
 
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
-		if (ifr == 0)
+		if (ifr == NULL)
 			return (EAFNOSUPPORT);		/* XXX */
 		switch (ifr->ifr_addr.sa_family) {
 		case AF_INET:

Modified: stable/11/sys/dev/isp/isp_pci.c
==============================================================================
--- stable/11/sys/dev/isp/isp_pci.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/isp/isp_pci.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -583,10 +583,10 @@ isp_get_specific_options(device_t dev, i
 	    name, &tval) == 0 && tval != 0) {
 		isp->isp_confopts |= ISP_CFG_FULL_DUPLEX;
 	}
-	sptr = 0;
+	sptr = NULL;
 	snprintf(name, sizeof(name), "%stopology", prefix);
 	if (resource_string_value(device_get_name(dev), device_get_unit(dev),
-	    name, (const char **) &sptr) == 0 && sptr != 0) {
+	    name, (const char **) &sptr) == 0 && sptr != NULL) {
 		if (strcmp(sptr, "lport") == 0) {
 			isp->isp_confopts |= ISP_CFG_LPORT;
 		} else if (strcmp(sptr, "nport") == 0) {
@@ -631,12 +631,12 @@ isp_get_specific_options(device_t dev, i
 	 * hint replacement to specify WWN strings with a leading
 	 * 'w' (e..g w50000000aaaa0001). Sigh.
 	 */
-	sptr = 0;
+	sptr = NULL;
 	snprintf(name, sizeof(name), "%sportwwn", prefix);
 	tval = resource_string_value(device_get_name(dev), device_get_unit(dev),
 	    name, (const char **) &sptr);
-	if (tval == 0 && sptr != 0 && *sptr++ == 'w') {
-		char *eptr = 0;
+	if (tval == 0 && sptr != NULL && *sptr++ == 'w') {
+		char *eptr = NULL;
 		ISP_FC_PC(isp, chan)->def_wwpn = strtouq(sptr, &eptr, 16);
 		if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwpn == -1) {
 			device_printf(dev, "mangled portwwn hint '%s'\n", sptr);
@@ -644,12 +644,12 @@ isp_get_specific_options(device_t dev, i
 		}
 	}
 
-	sptr = 0;
+	sptr = NULL;
 	snprintf(name, sizeof(name), "%snodewwn", prefix);
 	tval = resource_string_value(device_get_name(dev), device_get_unit(dev),
 	    name, (const char **) &sptr);
-	if (tval == 0 && sptr != 0 && *sptr++ == 'w') {
-		char *eptr = 0;
+	if (tval == 0 && sptr != NULL && *sptr++ == 'w') {
+		char *eptr = NULL;
 		ISP_FC_PC(isp, chan)->def_wwnn = strtouq(sptr, &eptr, 16);
 		if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwnn == 0) {
 			device_printf(dev, "mangled nodewwn hint '%s'\n", sptr);

Modified: stable/11/sys/dev/le/am7990.c
==============================================================================
--- stable/11/sys/dev/le/am7990.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/le/am7990.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -519,7 +519,7 @@ am7990_start_locked(struct lance_softc *
 		}
 
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
-		if (m == 0)
+		if (m == NULL)
 			break;
 
 		/*

Modified: stable/11/sys/dev/le/am79900.c
==============================================================================
--- stable/11/sys/dev/le/am79900.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/le/am79900.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -557,7 +557,7 @@ am79900_start_locked(struct lance_softc 
 		}
 
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
-		if (m == 0)
+		if (m == NULL)
 			break;
 
 		/*

Modified: stable/11/sys/dev/le/lance.c
==============================================================================
--- stable/11/sys/dev/le/lance.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/le/lance.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -418,7 +418,7 @@ lance_get(struct lance_softc *sc, int bo
 		totlen -= len;
 		if (totlen > 0) {
 			MGET(newm, M_NOWAIT, MT_DATA);
-			if (newm == 0)
+			if (newm == NULL)
 				goto bad;
 			len = MLEN;
 			m = m->m_next = newm;

Modified: stable/11/sys/dev/md/md.c
==============================================================================
--- stable/11/sys/dev/md/md.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/md/md.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -153,7 +153,7 @@ static g_access_t g_md_access;
 static void g_md_dumpconf(struct sbuf *sb, const char *indent,
     struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp);
 
-static struct cdev *status_dev = 0;
+static struct cdev *status_dev = NULL;
 static struct sx md_sx;
 static struct unrhdr *md_uh;
 

Modified: stable/11/sys/dev/ncr/ncr.c
==============================================================================
--- stable/11/sys/dev/ncr/ncr.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ncr/ncr.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -5206,7 +5206,7 @@ static void ncr_log_hard_error(ncb_p np,
 	} else {
 		script_ofs	= dsp;
 		script_size	= 0;
-		script_base	= 0;
+		script_base	= NULL;
 		script_name	= "mem";
 	}
 
@@ -5809,7 +5809,7 @@ static void ncr_int_sir (ncb_p np)
 	u_char scntl3;
 	u_char chg, ofs, per, fak, wide;
 	u_char num = INB (nc_dsps);
-	nccb_p	cp=0;
+	nccb_p	cp = NULL;
 	u_long	dsa;
 	u_int	target = INB (nc_sdid) & 0x0f;
 	tcb_p	tp     = &np->target[target];

Modified: stable/11/sys/dev/ofw/ofw_bus_subr.c
==============================================================================
--- stable/11/sys/dev/ofw/ofw_bus_subr.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ofw/ofw_bus_subr.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -944,7 +944,7 @@ ofw_bus_string_list_to_array(phandle_t n
 		i += len;
 		tptr += len;
 	}
-	array[cnt] = 0;
+	array[cnt] = NULL;
 	*out_array = array;
 
 	return (cnt);

Modified: stable/11/sys/dev/patm/if_patm_tx.c
==============================================================================
--- stable/11/sys/dev/patm/if_patm_tx.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/patm/if_patm_tx.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -440,7 +440,7 @@ patm_tx_pad(struct patm_softc *sc, struc
 		}
 	}
 	MGET(m, M_NOWAIT, MT_DATA);
-	if (m == 0) {
+	if (m == NULL) {
 		m_freem(m0);
 		if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1);
 		return (NULL);

Modified: stable/11/sys/dev/pccard/pccard.c
==============================================================================
--- stable/11/sys/dev/pccard/pccard.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/pccard/pccard.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -470,7 +470,7 @@ pccard_function_init(struct pccard_funct
 	struct pccard_ivar *devi = PCCARD_IVAR(pf->dev);
 	struct resource_list *rl = &devi->resources;
 	struct resource_list_entry *rle;
-	struct resource *r = 0;
+	struct resource *r = NULL;
 	struct pccard_ce_iospace *ios;
 	struct pccard_ce_memspace *mems;
 	device_t bus;
@@ -1115,7 +1115,7 @@ pccard_alloc_resource(device_t dev, devi
     rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
 {
 	struct pccard_ivar *dinfo;
-	struct resource_list_entry *rle = 0;
+	struct resource_list_entry *rle = NULL;
 	int passthrough = (device_get_parent(child) != dev);
 	int isdefault = (RMAN_IS_DEFAULT_RANGE(start, end) && count == 1);
 	struct resource *r = NULL;
@@ -1165,7 +1165,7 @@ pccard_release_resource(device_t dev, de
 {
 	struct pccard_ivar *dinfo;
 	int passthrough = (device_get_parent(child) != dev);
-	struct resource_list_entry *rle = 0;
+	struct resource_list_entry *rle = NULL;
 
 	if (passthrough)
 		return BUS_RELEASE_RESOURCE(device_get_parent(dev), child,

Modified: stable/11/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c
==============================================================================
--- stable/11/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -48,7 +48,7 @@ bit32 gLLSoftResetCounter   = 0;
 bit32 gPollForMissingInt;
 
 #ifdef FW_EVT_LOG_TST
-void  *eventLogAddress = 0;
+void  *eventLogAddress = NULL;
 #endif
 
 extern bit32 gWait_3;

Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c
==============================================================================
--- stable/11/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -379,7 +379,7 @@ tiCOMMgntIOCTL(
   bit32                     Offset = 0;
   bit32                     RequestLength = 0;  /* user request on how much data to pass to application */
   agsaContext_t		    *agContext = NULL;
-  bit8                      *loc = 0;
+  bit8                      *loc = NULL;
 
   TI_DBG3(("tiCOMMgntIOCTL: start\n"));
 

Modified: stable/11/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
==============================================================================
--- stable/11/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -5032,7 +5032,7 @@ STATIC void agtiapi_PrepCCBs( struct agt
 
   int i;
   U32 hdr_sz, ccb_sz;
-  ccb_t *pccb = 0;
+  ccb_t *pccb = NULL;
   int offset = 0;
   int nsegs = 0;
   int sgl_sz = 0;
@@ -5159,7 +5159,7 @@ STATIC U32 agtiapi_InitCCBs(struct agtia
 
   U32   max_ccb, size, ccb_sz, hdr_sz;
   int   no_allocs = 0, i;
-  ccb_hdr_t  *hdr = 0;
+  ccb_hdr_t  *hdr = NULL;
 
   AGTIAPI_PRINTK("agtiapi_InitCCBs: start\n");
   AGTIAPI_PRINTK("agtiapi_InitCCBs: tgtCount %d tid %d\n", tgtCount, tid);
@@ -5395,7 +5395,7 @@ STATIC U32 agtiapi_GetDevHandle( struct 
 
   for ( devIdx = 0; devIdx < pCard->devDiscover; devIdx++ )
   {
-    if ( agDev[devIdx] != 0 )
+    if ( agDev[devIdx] != NULL )
     {
       // AGTIAPI_PRINTK( "agtiapi_GetDevHandle: agDev %d not NULL %p\n",
       //                 devIdx, agDev[devIdx] );
@@ -5820,7 +5820,7 @@ STATIC void agtiapi_ReleaseCCBs( struct 
 
   ccb_hdr_t *hdr;
   U32 hdr_sz;
-  ccb_t *pccb = 0;
+  ccb_t *pccb = NULL;
 
   AGTIAPI_PRINTK( "agtiapi_ReleaseCCBs: start\n" );
 

Modified: stable/11/sys/dev/ppbus/if_plip.c
==============================================================================
--- stable/11/sys/dev/ppbus/if_plip.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ppbus/if_plip.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -245,7 +245,7 @@ lp_attach(device_t dev)
 	 */
 	lp->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
 	    RF_SHAREABLE);
-	if (lp->res_irq == 0) {
+	if (lp->res_irq == NULL) {
 		device_printf(dev, "cannot reserve interrupt, failed.\n");
 		return (ENXIO);
 	}
@@ -453,7 +453,7 @@ lpioctl(struct ifnet *ifp, u_long cmd, c
 
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
-		if (ifr == 0) {
+		if (ifr == NULL) {
 			return (EAFNOSUPPORT);		/* XXX */
 		}
 		switch (ifr->ifr_addr.sa_family) {

Modified: stable/11/sys/dev/ppbus/ppbconf.c
==============================================================================
--- stable/11/sys/dev/ppbus/ppbconf.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ppbus/ppbconf.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -206,7 +206,7 @@ search_token(char *str, int slen, char *
 static int
 ppb_pnp_detect(device_t bus)
 {
-	char *token, *class = 0;
+	char *token, *class = NULL;
 	int i, len, error;
 	int class_id = -1;
 	char str[PPB_PnP_STRING_SIZE+1];

Modified: stable/11/sys/dev/ppc/ppc.c
==============================================================================
--- stable/11/sys/dev/ppc/ppc.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/ppc/ppc.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -1329,9 +1329,9 @@ ppc_exec_microseq(device_t dev, struct p
 	register int reg;
 	register char mask;
 	register int accum = 0;
-	register char *ptr = 0;
+	register char *ptr = NULL;
 
-	struct ppb_microseq *stack = 0;
+	struct ppb_microseq *stack = NULL;
 
 /* microsequence registers are equivalent to PC-like port registers */
 
@@ -1501,7 +1501,7 @@ ppc_exec_microseq(device_t dev, struct p
 			mi = stack;
 
 			/* reset the stack */
-			stack = 0;
+			stack = NULL;
 
 			/* XXX return code */
 

Modified: stable/11/sys/dev/sbni/if_sbni_isa.c
==============================================================================
--- stable/11/sys/dev/sbni/if_sbni_isa.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/sbni/if_sbni_isa.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -132,7 +132,7 @@ sbni_attach_isa(device_t dev)
 	} else {
 		struct sbni_softc  *master;
 
-		if ((master = connect_to_master(sc)) == 0) {
+		if ((master = connect_to_master(sc)) == NULL) {
 			device_printf(dev, "failed to alloc irq\n");
 			sbni_release_resources(sc);
 			return (ENXIO);

Modified: stable/11/sys/dev/sn/if_sn.c
==============================================================================
--- stable/11/sys/dev/sn/if_sn.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/sn/if_sn.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -393,7 +393,7 @@ startagain:
 	 * Sneak a peek at the next packet
 	 */
 	m = ifp->if_snd.ifq_head;
-	if (m == 0)
+	if (m == NULL)
 		return;
 	/*
 	 * Compute the frame length and set pad to give an overall even
@@ -509,7 +509,7 @@ startagain:
 	/*
 	 * Push out the data to the card.
 	 */
-	for (top = m; m != 0; m = m->m_next) {
+	for (top = m; m != NULL; m = m->m_next) {
 
 		/*
 		 * Push out words.
@@ -607,7 +607,7 @@ snresume(struct ifnet *ifp)
 	 * Sneak a peek at the next packet
 	 */
 	m = ifp->if_snd.ifq_head;
-	if (m == 0) {
+	if (m == NULL) {
 		if_printf(ifp, "snresume() with nothing to send\n");
 		return;
 	}
@@ -708,7 +708,7 @@ snresume(struct ifnet *ifp)
 	/*
 	 * Push out the data to the card.
 	 */
-	for (top = m; m != 0; m = m->m_next) {
+	for (top = m; m != NULL; m = m->m_next) {
 
 		/*
 		 * Push out words.

Modified: stable/11/sys/dev/sym/sym_hipd.c
==============================================================================
--- stable/11/sys/dev/sym/sym_hipd.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/sym/sym_hipd.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -3710,7 +3710,7 @@ static void sym_log_hard_error(hcb_p np,
 	} else {
 		script_ofs	= dsp;
 		script_size	= 0;
-		script_base	= 0;
+		script_base	= NULL;
 		script_name	= "mem";
 	}
 
@@ -4296,7 +4296,7 @@ static void sym_int_ma (hcb_p np)
 	 *  try to find the interrupted script command,
 	 *  and the address at which to continue.
 	 */
-	vdsp	= 0;
+	vdsp	= NULL;
 	nxtdsp	= 0;
 	if	(dsp >  np->scripta_ba &&
 		 dsp <= np->scripta_ba + np->scripta_sz) {
@@ -6673,7 +6673,7 @@ static void sym_alloc_lcb_tags (hcb_p np
 	lp->cb_tags = sym_calloc(SYM_CONF_MAX_TASK, "CB_TAGS");
 	if (!lp->cb_tags) {
 		sym_mfree_dma(lp->itlq_tbl, SYM_CONF_MAX_TASK*4, "ITLQ_TBL");
-		lp->itlq_tbl = 0;
+		lp->itlq_tbl = NULL;
 		return;
 	}
 

Modified: stable/11/sys/dev/vx/if_vx.c
==============================================================================
--- stable/11/sys/dev/vx/if_vx.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/dev/vx/if_vx.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -350,7 +350,7 @@ vx_setlink(struct vx_softc *sc)
          */
 	i = sc->vx_connector;	/* default in EEPROM */
 	reason = "default";
-	warning = 0;
+	warning = NULL;
 
 	if (ifp->if_flags & IFF_LINK0) {
 		if (sc->vx_connectors & conn_tab[CONNECTOR_AUI].bit) {
@@ -729,7 +729,7 @@ again:
 
 	/* Pull packet off interface. */
 	m = vx_get(sc, len);
-	if (m == 0) {
+	if (m == NULL) {
 		if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
 		goto abort;
 	}

Modified: stable/11/sys/libkern/iconv_xlat16.c
==============================================================================
--- stable/11/sys/libkern/iconv_xlat16.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/libkern/iconv_xlat16.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -268,7 +268,7 @@ iconv_xlat16_conv(void *d2p, const char 
 			 * there is a case that inbuf char is a single
 			 * byte char while inlen == 2
 			 */
-			if ((u_char)*(src+1) == 0 && !nullin ) {
+			if ((u_char)*(src+1) == '\0' && !nullin ) {
 				src++;
 				ir--;
 			} else {

Modified: stable/11/sys/net/if_fddisubr.c
==============================================================================
--- stable/11/sys/net/if_fddisubr.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/net/if_fddisubr.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -400,7 +400,7 @@ fddi_input(ifp, m)
 	m_adj(m, FDDI_HDR_LEN);
 
 	m = m_pullup(m, LLC_SNAPFRAMELEN);
-	if (m == 0) {
+	if (m == NULL) {
 		if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
 		goto dropanyway;
 	}

Modified: stable/11/sys/net/if_iso88025subr.c
==============================================================================
--- stable/11/sys/net/if_iso88025subr.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/net/if_iso88025subr.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -487,7 +487,7 @@ iso88025_input(ifp, m)
 	m_adj(m, mac_hdr_len);
 
 	m = m_pullup(m, LLC_SNAPFRAMELEN);
-	if (m == 0) {
+	if (m == NULL) {
 		if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
 		goto dropanyway;
 	}

Modified: stable/11/sys/net/iflib.c
==============================================================================
--- stable/11/sys/net/iflib.c	Tue Mar 14 02:04:44 2017	(r315220)
+++ stable/11/sys/net/iflib.c	Tue Mar 14 02:06:03 2017	(r315221)
@@ -989,7 +989,7 @@ iflib_netmap_txq_init(if_ctx_t ctx, ifli
 	struct netmap_slot *slot;
 
 	slot = netmap_reset(na, NR_TX, txq->ift_id, 0);
-	if (slot == 0)
+	if (slot == NULL)
 		return;
 
 	for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxd[0]; i++) {
@@ -1014,7 +1014,7 @@ iflib_netmap_rxq_init(if_ctx_t ctx, ifli
 	int nrxd;
 
 	slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0);
-	if (slot == 0)
+	if (slot == NULL)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703140206.v2E264XL070870>