excluding sys/crypto/xform_ipcomp.c:76:23 as zlib has Z_NULL as 0 diff --git sys/crypto/cryptosoft.c sys/crypto/cryptosoft.c index dcb815aaa17..be1f3f1ec5c 100644 --- sys/crypto/cryptosoft.c +++ sys/crypto/cryptosoft.c @@ -424,7 +424,7 @@ swcr_authcompute(struct cryptop *crp, struct cryptodesc *crd, union authctx ctx; int err; - if (sw->sw_ictx == 0) + if (sw->sw_ictx == NULL) return EINVAL; axf = sw->sw_axf; @@ -521,7 +521,7 @@ swcr_authenc(struct cryptop *crp) swa = sw; crda = crd; axf = swa->sw_axf; - if (swa->sw_ictx == 0) + if (swa->sw_ictx == NULL) return (EINVAL); bcopy(swa->sw_ictx, &ctx, axf->ctxsize); blksz = axf->blocksize; diff --git sys/nfs/nfs_socket.c sys/nfs/nfs_socket.c index 38e0ee99d66..6f265982818 100644 --- sys/nfs/nfs_socket.c +++ sys/nfs/nfs_socket.c @@ -824,7 +824,7 @@ nfsmout: * If not matched to a request, drop it. * If it's mine, get out. */ - if (rep == 0) { + if (rep == NULL) { nfsstats.rpcunexpected++; m_freem(info.nmi_mrep); } else if (rep == myrep) { diff --git sys/scsi/scsiconf.c sys/scsi/scsiconf.c index baa4dfdcdd7..e41717d387a 100644 --- sys/scsi/scsiconf.c +++ sys/scsi/scsiconf.c @@ -701,7 +701,7 @@ scsi_probe_link(struct scsibus_softc *sb, int target, int lun, int dumbscan) sa.sa_sc_link = link; if ((cf = config_search(scsibussubmatch, (struct device *)sb, - &sa)) == 0) { + &sa)) == NULL) { scsibussubprint(&sa, sb->sc_dev.dv_xname); printf(" not configured\n"); goto free_devid; @@ -1089,7 +1089,8 @@ scsi_inqmatch(struct scsi_inquiry_data *inqbuf, const void *_base, /* Include the qualifier to catch vendor-unique types. */ removable = ISSET(inqbuf->dev_qual2, SID_REMOVABLE) ? T_REMOV : T_FIXED; - for (*bestpriority = 0, bestmatch = 0; nmatches--; base += matchsize) { + for (*bestpriority = 0, bestmatch = NULL; nmatches--; + base += matchsize) { struct scsi_inquiry_pattern *match = (void *)base; int priority, len; diff --git sys/uvm/uvm_swap.c sys/uvm/uvm_swap.c index d333e547e06..a2287333574 100644 --- sys/uvm/uvm_swap.c +++ sys/uvm/uvm_swap.c @@ -272,8 +272,8 @@ uvm_swap_init(void) * or no allocation). */ swapmap = extent_create("swapmap", 1, INT_MAX, - M_VMSWAP, 0, 0, EX_NOWAIT); - if (swapmap == 0) + M_VMSWAP, NULL, 0, EX_NOWAIT); + if (swapmap == NULL) panic("uvm_swap_init: extent_create failed"); /* allocate pools for structures used for swapping to files. */ @@ -863,7 +863,7 @@ swap_on(struct proc *p, struct swapdev *sdp) */ switch (vp->v_type) { case VBLK: - if (bdevsw[major(dev)].d_psize == 0 || + if (bdevsw[major(dev)].d_psize == NULL || (nblocks = (*bdevsw[major(dev)].d_psize)(dev)) == -1) { error = ENXIO; goto bad; @@ -939,7 +939,7 @@ swap_on(struct proc *p, struct swapdev *sdp) /* note that extent_create's 3rd arg is inclusive, thus "- 1" */ sdp->swd_ex = extent_create(sdp->swd_exname, 0, npages - 1, M_VMSWAP, - 0, 0, EX_WAITOK); + NULL, 0, EX_WAITOK); /* allocate the `saved' region from the extent so it won't be used */ if (addr) { if (extent_alloc_region(sdp->swd_ex, 0, addr, EX_WAITOK)) diff --git sys/uvm/uvm_vnode.c sys/uvm/uvm_vnode.c index 3cbdd5222b6..f4f29196800 100644 --- sys/uvm/uvm_vnode.c +++ sys/uvm/uvm_vnode.c @@ -614,7 +614,7 @@ uvn_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags) * [borrowed PG_CLEANCHK idea from FreeBSD VM] */ if ((flags & PGO_CLEANIT) != 0) { - KASSERT(uobj->pgops->pgo_mk_pcluster != 0); + KASSERT(uobj->pgops->pgo_mk_pcluster != NULL); for (curoff = start ; curoff < stop; curoff += PAGE_SIZE) { if ((pp = uvm_pagelookup(uobj, curoff)) != NULL) atomic_clearbits_int(&pp->pg_flags,