diff --git a/sys/alpha/alpha/db_trace.c b/sys/alpha/alpha/db_trace.c index c2031687f19f..b269dc0bd6f6 100644 --- a/sys/alpha/alpha/db_trace.c +++ b/sys/alpha/alpha/db_trace.c @@ -99,7 +99,7 @@ static struct special_symbol { { (uintptr_t)&XentSys, "syscall" }, { (uintptr_t)&XentUna, "unaligned access fault" }, { (uintptr_t)&XentRestart, "console restart" }, - { NULL } + { 0, NULL } }; @@ -180,7 +180,7 @@ sym_is_trapsymbol(uintptr_t v) { int i; - for (i = 0; special_symbols[i].ss_val != NULL; ++i) + for (i = 0; special_symbols[i].ss_val != 0; ++i) if (v == special_symbols[i].ss_val) return 1; return 0; @@ -339,7 +339,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *m if (sym_is_trapsymbol(symval)) { tf = (struct trapframe *)frame; - for (i = 0; special_symbols[i].ss_val != NULL; ++i) + for (i = 0; special_symbols[i].ss_val != 0; ++i) if (symval == special_symbols[i].ss_val) db_printf("--- %s", special_symbols[i].ss_note); diff --git a/sys/alpha/alpha/dump_machdep.c b/sys/alpha/alpha/dump_machdep.c index 0b5a883287b4..42523d75ddb2 100644 --- a/sys/alpha/alpha/dump_machdep.c +++ b/sys/alpha/alpha/dump_machdep.c @@ -88,7 +88,7 @@ dumpsys(struct dumperinfo *di) dumplo = di->mediaoffset + di->mediasize - Maxmem * (off_t)PAGE_SIZE; dumplo -= sizeof kdh * 2; - i = di->dumper(di->priv, &kdh, NULL, dumplo, sizeof kdh); + i = di->dumper(di->priv, &kdh, 0, dumplo, sizeof kdh); if (i) printf("\nDump failed writing header (%d)\n", i); dumplo += sizeof kdh; @@ -111,7 +111,7 @@ dumpsys(struct dumperinfo *di) printf(" %d", count / (1024 * 1024 / PAGE_SIZE)); mb = i; } - i = di->dumper(di->priv, va, NULL, dumplo, left * PAGE_SIZE); + i = di->dumper(di->priv, va, 0, dumplo, left * PAGE_SIZE); if (i) break; count += left; @@ -120,10 +120,10 @@ dumpsys(struct dumperinfo *di) } if (i) printf("\nDump failed writing data (%d)\n", i); - i = di->dumper(di->priv, &kdh, NULL, dumplo, sizeof kdh); + i = di->dumper(di->priv, &kdh, 0, dumplo, sizeof kdh); if (i) printf("\nDump failed writing trailer (%d)\n", i); - di->dumper(di->priv, NULL, NULL, 0, 0); /* tell them we are done */ + di->dumper(di->priv, NULL, 0, 0, 0); /* tell them we are done */ printf("\nDump complete\n"); return; } diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index cd9da0427643..a7cce49816fb 100644 --- a/sys/alpha/pci/apecs.c +++ b/sys/alpha/pci/apecs.c @@ -292,7 +292,7 @@ apecs_attach(device_t dev) sc->smem_base = APECS_PCI_SPARSE; sc->io_base = APECS_PCI_SIO; sc->cfg0_base = KV(APECS_PCI_CONF); - sc->cfg1_base = NULL; + sc->cfg1_base = 0; set_iointr(alpha_dispatch_intr); diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 63cbbecda5d5..ba54a7cd9755 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1314,7 +1314,7 @@ fwohci_tx_enable(struct fwohci_softc *sc, struct fwohci_dbch *dbch) { int err = 0; int idb, z, i, dmach = 0, ldesc; - u_int32_t off = NULL; + u_int32_t off = 0; struct fwohcidb_tr *db_tr; struct fwohcidb *db; @@ -1329,7 +1329,7 @@ fwohci_tx_enable(struct fwohci_softc *sc, struct fwohci_dbch *dbch) break; } } - if(off == NULL){ + if(off == 0){ err = EINVAL; return err; } @@ -1373,7 +1373,7 @@ fwohci_rx_enable(struct fwohci_softc *sc, struct fwohci_dbch *dbch) { int err = 0; int idb, z, i, dmach = 0, ldesc; - u_int32_t off = NULL; + u_int32_t off = 0; struct fwohcidb_tr *db_tr; struct fwohcidb *db; @@ -1390,7 +1390,7 @@ fwohci_rx_enable(struct fwohci_softc *sc, struct fwohci_dbch *dbch) } } } - if(off == NULL){ + if(off == 0){ err = EINVAL; return err; } diff --git a/sys/dev/gfb/gfb_pci.c b/sys/dev/gfb/gfb_pci.c index 4527f0bd2074..d36e2d88d308 100644 --- a/sys/dev/gfb/gfb_pci.c +++ b/sys/dev/gfb/gfb_pci.c @@ -136,9 +136,9 @@ pcigfb_attach(device_t dev) adp->va_mem_base = (vm_offset_t)rman_get_virtual(sc->res); adp->va_mem_size = rman_get_end(sc->res) - rman_get_start(sc->res); - adp->va_io_base = NULL; + adp->va_io_base = 0; adp->va_io_size = 0; - adp->va_crtc_addr = NULL; + adp->va_crtc_addr = 0; gfb_device_softcs[sc->model][unit] = sc; sc->gfbc = (struct gfb_conf *)malloc(sizeof(struct gfb_conf), M_DEVBUF, M_NOWAIT); diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c index afc06847f936..f0b800349bdb 100644 --- a/sys/dev/mpt/mpt_pci.c +++ b/sys/dev/mpt/mpt_pci.c @@ -474,7 +474,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) device_t dev = mpt->dev; /* Check if we alreay have allocated the reply memory */ - if (mpt->reply_phys != NULL) { + if (mpt->reply_phys != 0) { return 0; } diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c09e9d6c7528..63e3fcff59fb 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -359,7 +359,7 @@ stopprofclock(p) p->p_flag |= P_STOPPROF; while (p->p_profthreads != 0) msleep(&p->p_profthreads, &p->p_mtx, PPAUSE, - "stopprof", NULL); + "stopprof", 0); p->p_flag &= ~P_STOPPROF; } mtx_lock_spin(&sched_lock); diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index aa6e532c21e7..574b3362427c 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -897,7 +897,7 @@ m_defrag(struct mbuf *m0, int how) if (m_final == NULL) goto nospace; - if (m_dup_pkthdr(m_final, m0, how) == NULL) + if (m_dup_pkthdr(m_final, m0, how) == 0) goto nospace; m_new = m_final; diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 667a04c2281f..404171252b93 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -463,7 +463,7 @@ ip_fastforward(struct mbuf *m) if (!ipstealth) { #endif if (ip->ip_ttl <= IPTTLDEC) { - icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, NULL, NULL); + icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, NULL); return 1; } @@ -503,7 +503,7 @@ ip_fastforward(struct mbuf *m) } else { ipstat.ips_noroute++; ipstat.ips_cantforward++; - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, NULL, NULL); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, NULL); if (ro.ro_rt) RTFREE(ro.ro_rt); return 1; @@ -707,8 +707,7 @@ ip_fastforward(struct mbuf *m) } else { ipstat.ips_noroute++; ipstat.ips_cantforward++; - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, - NULL, NULL); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, NULL); if (ro.ro_rt) RTFREE(ro.ro_rt); return 1; @@ -750,7 +749,7 @@ ip_fastforward(struct mbuf *m) */ if (ip->ip_off & IP_DF) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, - NULL, ifp); + 0, ifp); ipstat.ips_cantfrag++; RTFREE(ro.ro_rt); return 1; diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 88ace1cc6cac..ab513a836b48 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -640,7 +640,7 @@ in6_selectroute(dstsock, opts, mopts, ro, retifp, retrt, clone) rtalloc((struct route *)ro); } else { ro->ro_rt = rtalloc1(&((struct route *)ro) - ->ro_dst, NULL, 0UL); + ->ro_dst, 0, 0UL); if (ro->ro_rt) RT_UNLOCK(ro->ro_rt); } diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index a68237ea9113..95872b86dc66 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1857,7 +1857,7 @@ pim6_input(mp, offp, proto) #endif rc = if_simloop(mif6table[reg_mif_num].m6_ifp, m, - dst.sin6_family, NULL); + dst.sin6_family, 0); /* prepare the register head to send to the mrouting daemon */ m = mcp; diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 99addae58537..55dbd031a770 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1481,10 +1481,10 @@ ip6_ctloutput(so, sopt) struct mbuf *m; error = soopt_getm(sopt, &m); /* XXX */ - if (error != NULL) + if (error != 0) break; error = soopt_mcopyin(sopt, m); /* XXX */ - if (error != NULL) + if (error != 0) break; error = ip6_pcbopts(&in6p->in6p_outputopts, m, so, sopt); @@ -3405,7 +3405,7 @@ ip6_mloopback(ifp, m, dst) in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - (void)if_simloop(ifp, copym, dst->sin6_family, NULL); + (void)if_simloop(ifp, copym, dst->sin6_family, 0); } /* diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 921d047355c6..1e3863fad18d 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -170,7 +170,7 @@ static struct rl_type rl_devs[] = { "LevelOne FPC-0106TX" }, { EDIMAX_VENDORID, EDIMAX_DEVICEID_EP4103DL, RL_8139, "Edimax EP-4103DL CardBus" }, - { 0, 0, NULL } + { 0, 0, 0, NULL } }; static int rl_probe (device_t); diff --git a/sys/sys/umtx.h b/sys/sys/umtx.h index 7b6b3f4fa2b2..2098248d5ac2 100644 --- a/sys/sys/umtx.h +++ b/sys/sys/umtx.h @@ -34,7 +34,7 @@ * See pthread_* */ -#define UMTX_UNOWNED NULL +#define UMTX_UNOWNED 0x0 #define UMTX_CONTESTED 0x1