Page MenuHomeFreeBSD

D9694.id25504.diff
No OneTemporary

D9694.id25504.diff

Index: head/sys/amd64/amd64/db_disasm.c
===================================================================
--- head/sys/amd64/amd64/db_disasm.c
+++ head/sys/amd64/amd64/db_disasm.c
@@ -1044,7 +1044,7 @@
return (loc);
}
addrp->is_reg = FALSE;
- addrp->index = 0;
+ addrp->index = NULL;
if (short_addr)
size = LONG;
@@ -1067,7 +1067,7 @@
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_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 @@
get_value_inc(inst, loc, 1, FALSE);
short_addr = FALSE;
size = LONG;
- seg = 0;
+ seg = NULL;
/*
* Get prefixes
@@ -1313,7 +1313,7 @@
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 {
Index: head/sys/amd64/amd64/pmap.c
===================================================================
--- head/sys/amd64/amd64/pmap.c
+++ head/sys/amd64/amd64/pmap.c
@@ -391,7 +391,7 @@
/*
* 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;
Index: head/sys/boot/common/md.c
===================================================================
--- head/sys/boot/common/md.c
+++ head/sys/boot/common/md.c
@@ -103,7 +103,7 @@
if ((ofs + size) > MD_IMAGE_SIZE)
size = MD_IMAGE_SIZE - ofs;
- if (rsize != 0)
+ if (rsize != NULL)
*rsize = size;
switch (rw) {
Index: head/sys/boot/efi/libefi/efinet.c
===================================================================
--- head/sys/boot/efi/libefi/efinet.c
+++ head/sys/boot/efi/libefi/efinet.c
@@ -131,13 +131,13 @@
/* 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);
Index: head/sys/boot/fdt/fdt_overlay.c
===================================================================
--- head/sys/boot/fdt/fdt_overlay.c
+++ head/sys/boot/fdt/fdt_overlay.c
@@ -64,7 +64,7 @@
int prop_offset, o, proplen;
void *result;
- result = 0;
+ result = NULL;
path = strdup(fixup);
prop = strchr(path, ':');
Index: head/sys/boot/ficl/ficl.c
===================================================================
--- head/sys/boot/ficl/ficl.c
+++ head/sys/boot/ficl/ficl.c
@@ -276,7 +276,7 @@
FICL_SYSTEM *pSys = pVM->pSys;
FICL_VM *pList = pSys->vmList;
- assert(pVM != 0);
+ assert(pVM != NULL);
if (pSys->vmList == pVM)
{
Index: head/sys/boot/kshim/bsd_kernel.c
===================================================================
--- head/sys/boot/kshim/bsd_kernel.c
+++ head/sys/boot/kshim/bsd_kernel.c
@@ -75,7 +75,7 @@
void *addr;
addr = malloc(dmat->maxsize + dmat->alignment, XXX, XXX);
- if (addr == 0)
+ if (addr == NULL)
return (ENOMEM);
*mapp = addr;
Index: head/sys/boot/ofw/libofw/ofw_memory.c
===================================================================
--- head/sys/boot/ofw/libofw/ofw_memory.c
+++ head/sys/boot/ofw/libofw/ofw_memory.c
@@ -35,7 +35,7 @@
#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 {
Index: head/sys/boot/sparc64/loader/main.c
===================================================================
--- head/sys/boot/sparc64/loader/main.c
+++ head/sys/boot/sparc64/loader/main.c
@@ -859,7 +859,7 @@
/*
* Initialize devices.
*/
- for (dp = devsw; *dp != 0; dp++)
+ for (dp = devsw; *dp != NULL; dp++)
if ((*dp)->dv_init != 0)
(*dp)->dv_init();
Index: head/sys/boot/userboot/userboot/userboot_disk.c
===================================================================
--- head/sys/boot/userboot/userboot/userboot_disk.c
+++ head/sys/boot/userboot/userboot/userboot_disk.c
@@ -91,8 +91,8 @@
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;
Index: head/sys/boot/zfs/zfs.c
===================================================================
--- head/sys/boot/zfs/zfs.c
+++ head/sys/boot/zfs/zfs.c
@@ -126,7 +126,7 @@
{
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);
Index: head/sys/boot/zfs/zfsimpl.c
===================================================================
--- head/sys/boot/zfs/zfsimpl.c
+++ head/sys/boot/zfs/zfsimpl.c
@@ -69,7 +69,7 @@
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;
@@ -1527,7 +1527,7 @@
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);
@@ -2316,7 +2316,7 @@
p = q;
} else {
strcpy(element, p);
- p = 0;
+ p = NULL;
}
rc = zfs_dnode_stat(spa, &dn, &sb);
Index: head/sys/libkern/iconv_xlat16.c
===================================================================
--- head/sys/libkern/iconv_xlat16.c
+++ head/sys/libkern/iconv_xlat16.c
@@ -268,7 +268,7 @@
* 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 {
Index: head/sys/mips/atheros/ar531x/apb.c
===================================================================
--- head/sys/mips/atheros/ar531x/apb.c
+++ head/sys/mips/atheros/ar531x/apb.c
@@ -329,7 +329,7 @@
}
rv = rman_reserve_resource(rm, start, end, count, flags, child);
- if (rv == 0) {
+ if (rv == NULL) {
printf("%s: could not reserve resource %d\n", __func__, type);
return (0);
}
Index: head/sys/net/if_fddisubr.c
===================================================================
--- head/sys/net/if_fddisubr.c
+++ head/sys/net/if_fddisubr.c
@@ -400,7 +400,7 @@
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;
}
Index: head/sys/net/if_iso88025subr.c
===================================================================
--- head/sys/net/if_iso88025subr.c
+++ head/sys/net/if_iso88025subr.c
@@ -487,7 +487,7 @@
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;
}
Index: head/sys/net/iflib.c
===================================================================
--- head/sys/net/iflib.c
+++ head/sys/net/iflib.c
@@ -1003,7 +1003,7 @@
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++) {
@@ -1028,7 +1028,7 @@
int nrxd;
slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0);
- if (slot == 0)
+ if (slot == NULL)
return;
map = rxq->ifr_fl[0].ifl_sds.ifsd_map;
nrxd = ctx->ifc_softc_ctx.isc_nrxd[0];
Index: head/sys/netpfil/ipfw/ip_fw_sockopt.c
===================================================================
--- head/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ head/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -3135,7 +3135,7 @@
classify_opcode_kidx(ipfw_insn *cmd, uint16_t *puidx)
{
- if (find_op_rw(cmd, puidx, NULL) == 0)
+ if (find_op_rw(cmd, puidx, NULL) == NULL)
return (1);
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 23, 7:07 AM (17 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30169634
Default Alt Text
D9694.id25504.diff (8 KB)

Event Timeline