Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys NULL != 0
details: https://anonhg.NetBSD.org/src/rev/6639b4cce571
branches: trunk
changeset: 486326:6639b4cce571
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri May 19 04:34:39 2000 +0000
description:
NULL != 0
diffstat:
sys/arch/i386/i386/machdep.c | 4 ++--
sys/arch/i386/i386/pmap.c | 12 ++++++------
sys/dev/ic/aic7xxx.c | 6 +++---
sys/dev/usb/uaudio.c | 6 +++---
sys/netinet6/ip6_output.c | 4 ++--
sys/netinet6/ipcomp_output.c | 6 +++---
sys/netkey/key.c | 8 ++++----
sys/ufs/ext2fs/ext2fs_alloc.c | 14 +++++++-------
sys/ufs/ffs/ffs_alloc.c | 36 ++++++++++++++++++------------------
sys/ufs/lfs/lfs_bio.c | 5 +++--
sys/ufs/lfs/lfs_segment.c | 4 ++--
sys/ufs/lfs/lfs_vfsops.c | 4 ++--
sys/uvm/uvm_aobj.c | 4 ++--
13 files changed, 57 insertions(+), 56 deletions(-)
diffs (truncated from 476 to 300 lines):
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/arch/i386/i386/machdep.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.384 2000/05/11 16:38:11 jdolecek Exp $ */
+/* $NetBSD: machdep.c,v 1.385 2000/05/19 04:34:39 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -263,7 +263,7 @@
* Initialize error message buffer (et end of core).
*/
msgbuf_vaddr = uvm_km_valloc(kernel_map, i386_round_page(MSGBUFSIZE));
- if (msgbuf_vaddr == NULL)
+ if (msgbuf_vaddr == 0)
panic("failed to valloc msgbuf_vaddr");
/* msgbuf_paddr was init'd in pmap */
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/arch/i386/i386/pmap.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.89 2000/04/24 17:18:17 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.90 2000/05/19 04:34:40 thorpej Exp $ */
/*
*
@@ -950,7 +950,7 @@
sizeof(char) * npages);
s = round_page(s); /* round up */
addr = (vaddr_t) uvm_km_zalloc(kernel_map, s);
- if (addr == NULL)
+ if (addr == 0)
panic("pmap_init: unable to allocate pv_heads");
/*
@@ -982,7 +982,7 @@
pv_initpage = (struct pv_page *) uvm_km_alloc(kernel_map, NBPG);
if (pv_initpage == NULL)
panic("pmap_init: pv_initpage");
- pv_cachedva = NULL; /* a VA we have allocated but not used yet */
+ pv_cachedva = 0; /* a VA we have allocated but not used yet */
pv_nfpvents = 0;
(void) pmap_add_pvpage(pv_initpage, FALSE);
@@ -1117,10 +1117,10 @@
*/
s = splimp(); /* must protect kmem_map/kmem_object with splimp! */
- if (pv_cachedva == NULL) {
+ if (pv_cachedva == 0) {
pv_cachedva = uvm_km_kmemalloc(kmem_map, uvmexp.kmem_object,
NBPG, UVM_KMF_TRYLOCK|UVM_KMF_VALLOC);
- if (pv_cachedva == NULL) {
+ if (pv_cachedva == 0) {
splx(s);
goto steal_one;
}
@@ -1158,7 +1158,7 @@
pmap_kenter_pa(pv_cachedva, VM_PAGE_TO_PHYS(pg), VM_PROT_ALL);
pvpage = (struct pv_page *) pv_cachedva;
- pv_cachedva = NULL;
+ pv_cachedva = 0;
return(pmap_add_pvpage(pvpage, mode != ALLOCPV_NONEED));
steal_one:
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/dev/ic/aic7xxx.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.47 2000/05/14 18:22:13 dante Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.48 2000/05/19 04:34:41 thorpej Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -372,7 +372,7 @@
hscb->data = htole32(hscb->data);
hscb->datalen = htole32(hscb->datalen);
/*
- * No need to swap cmdpointer; it's either NULL or set to
+ * No need to swap cmdpointer; it's either 0 or set to
* cmdstore_busaddr, which is already swapped.
*/
}
@@ -4016,7 +4016,7 @@
hscb->control |= DISCENB;
if (xs->xs_control & XS_CTL_RESET) {
- hscb->cmdpointer = NULL;
+ hscb->cmdpointer = 0;
scb->flags |= SCB_DEVICE_RESET;
hscb->control |= MK_MESSAGE;
return ahc_execute_scb(scb, NULL, 0);
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/dev/usb/uaudio.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaudio.c,v 1.24 2000/04/27 15:26:47 augustss Exp $ */
+/* $NetBSD: uaudio.c,v 1.25 2000/05/19 04:34:42 thorpej Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -536,7 +536,7 @@
struct uaudio_softc *sc;
struct mixerctl *mc;
{
- if (sc->sc_nctls == NULL)
+ if (sc->sc_nctls == 0)
sc->sc_ctls = malloc(sizeof *mc, M_USBDEV, M_NOWAIT);
else
sc->sc_ctls = realloc(sc->sc_ctls,
@@ -1029,7 +1029,7 @@
struct uaudio_softc *sc;
struct as_info *ai;
{
- if (sc->sc_nalts == NULL)
+ if (sc->sc_nalts == 0)
sc->sc_alts = malloc(sizeof *ai, M_USBDEV, M_NOWAIT);
else
sc->sc_alts = realloc(sc->sc_alts,
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/netinet6/ip6_output.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_output.c,v 1.19 2000/05/19 01:40:18 itojun Exp $ */
+/* $NetBSD: ip6_output.c,v 1.20 2000/05/19 04:34:43 thorpej Exp $ */
/* $KAME: ip6_output.c,v 1.102 2000/05/17 15:31:56 itojun Exp $ */
/*
@@ -683,7 +683,7 @@
* if necessary.
*/
if (ip6_mrouter && (flags & IPV6_FORWARDING) == 0) {
- if (ip6_mforward(ip6, ifp, m) != NULL) {
+ if (ip6_mforward(ip6, ifp, m) != 0) {
m_freem(m);
goto done;
}
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/netinet6/ipcomp_output.c
--- a/sys/netinet6/ipcomp_output.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/netinet6/ipcomp_output.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipcomp_output.c,v 1.9 2000/02/06 12:49:46 itojun Exp $ */
+/* $NetBSD: ipcomp_output.c,v 1.10 2000/05/19 04:34:43 thorpej Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -397,7 +397,7 @@
ipseclog((LOG_DEBUG, "ipcomp4_output: first mbuf too short\n"));
ipsecstat.out_inval++;
m_freem(m);
- return NULL;
+ return 0;
}
ip = mtod(m, struct ip *);
/* XXX assumes that m->m_next points to payload */
@@ -417,7 +417,7 @@
ipseclog((LOG_DEBUG, "ipcomp6_output: first mbuf too short\n"));
ipsec6stat.out_inval++;
m_freem(m);
- return NULL;
+ return 0;
}
return ipcomp_output(m, nexthdrp, md, isr, AF_INET6);
}
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/netkey/key.c
--- a/sys/netkey/key.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/netkey/key.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.17 2000/05/08 18:31:37 thorpej Exp $ */
+/* $NetBSD: key.c,v 1.18 2000/05/19 04:34:43 thorpej Exp $ */
/* $KAME: key.c,v 1.67 2000/03/05 02:38:25 itojun Exp $ */
/*
@@ -4104,7 +4104,7 @@
return NULL;
/* check SA values to be mature. */
- if ((msg0->sadb_msg_errno = key_mature(newsav)) != NULL) {
+ if ((msg0->sadb_msg_errno = key_mature(newsav)) != 0) {
key_freesav(newsav);
return NULL;
}
@@ -5367,7 +5367,7 @@
printf("key_dump: invalid satype is passed.\n");
#endif
msg0->sadb_msg_errno = EINVAL;
- return NULL;
+ return 0;
}
/* count sav entries to be sent to the userland. */
@@ -5406,7 +5406,7 @@
printf("key_dump: there was invalid proto in SAD.\n");
#endif
msg0->sadb_msg_errno = EINVAL;
- return NULL;
+ return 0;
}
for (stateidx = 0;
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/ufs/ext2fs/ext2fs_alloc.c
--- a/sys/ufs/ext2fs/ext2fs_alloc.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/ufs/ext2fs/ext2fs_alloc.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_alloc.c,v 1.7 2000/03/30 12:41:09 augustss Exp $ */
+/* $NetBSD: ext2fs_alloc.c,v 1.8 2000/05/19 04:34:44 thorpej Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@@ -326,7 +326,7 @@
if (cg == fs->e2fs_ncg)
cg = 0;
}
- return (NULL);
+ return (0);
}
/*
@@ -350,13 +350,13 @@
fs = ip->i_e2fs;
if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0)
- return (NULL);
+ return (0);
error = bread(ip->i_devvp, fsbtodb(fs,
fs->e2fs_gd[cg].ext2bgd_b_bitmap),
(int)fs->e2fs_bsize, NOCRED, &bp);
if (error) {
brelse(bp);
- return (NULL);
+ return (0);
}
bbp = (char *)bp->b_data;
@@ -398,7 +398,7 @@
bno = ext2fs_mapsearch(fs, bbp, bpref);
if (bno < 0)
- return (NULL);
+ return (0);
gotit:
#ifdef DIAGNOSTIC
if (isset(bbp, (long)bno)) {
@@ -439,13 +439,13 @@
ipref--; /* to avoid a lot of (ipref -1) */
fs = ip->i_e2fs;
if (fs->e2fs_gd[cg].ext2bgd_nifree == 0)
- return (NULL);
+ return (0);
error = bread(ip->i_devvp, fsbtodb(fs,
fs->e2fs_gd[cg].ext2bgd_i_bitmap),
(int)fs->e2fs_bsize, NOCRED, &bp);
if (error) {
brelse(bp);
- return (NULL);
+ return (0);
}
ibp = (char *)bp->b_data;
if (ipref) {
diff -r c1c4b4ecd815 -r 6639b4cce571 sys/ufs/ffs/ffs_alloc.c
--- a/sys/ufs/ffs/ffs_alloc.c Fri May 19 04:15:55 2000 +0000
+++ b/sys/ufs/ffs/ffs_alloc.c Fri May 19 04:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_alloc.c,v 1.34 2000/04/04 09:23:20 jdolecek Exp $ */
+/* $NetBSD: ffs_alloc.c,v 1.35 2000/05/19 04:34:44 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -721,7 +721,7 @@
fs->fs_cgrotor = cg;
return (fs->fs_fpg * cg + fs->fs_frag);
}
- return (NULL);
+ return (0);
}
/*
* One or more previous blocks have been laid out. If less
@@ -799,7 +799,7 @@
if (cg == fs->fs_ncg)
cg = 0;
}
- return (NULL);
+ return (0);
}
/*
@@ -824,30 +824,30 @@
fs = ip->i_fs;
if (fs->fs_cs(fs, cg).cs_nffree < numfrags(fs, nsize - osize))
- return (NULL);
+ return (0);
frags = numfrags(fs, nsize);
bbase = fragnum(fs, bprev);
if (bbase > fragnum(fs, (bprev + frags - 1))) {
/* cannot extend across a block boundary */
- return (NULL);
+ return (0);
Home |
Main Index |
Thread Index |
Old Index