Don't confuse NULL with 0.

This commit is contained in:
David E. O'Brien 2003-12-26 14:30:19 +00:00
parent f01ac8a3dd
commit 8ae025dbda
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123866
3 changed files with 4 additions and 4 deletions

View File

@ -295,7 +295,7 @@ db_utrace(struct thread *td, struct trapframe *tf)
}
if (!found) {
rsp = sp + SPOFF;
sp = NULL;
sp = 0;
if (copyin((void *)(rsp + offsetof(struct frame, fr_fp)),
&sp, sizeof(sp)) != 0 ||
copyin((void *)(rsp + offsetof(struct frame, fr_pc)),

View File

@ -137,7 +137,7 @@ blk_dump(struct dumperinfo *di, vm_paddr_t pa, vm_size_t size)
printf(" chunk at %#lx: %ld bytes ", (u_long)pa, (long)size);
va = NULL;
va = 0L;
error = counter = twiddle = 0;
for (pos = 0; pos < size; pos += MAXDUMPSZ, counter++) {
if (counter % 128 == 0)

View File

@ -76,7 +76,7 @@ OF_decode_addr(phandle_t node, int *space, bus_addr_t *addr)
int cs, i, rsz, type;
bus = OF_parent(node);
if (bus == NULL)
if (bus == 0)
return (ENXIO);
if (OF_getprop(bus, "name", name, sizeof(name)) == -1)
return (ENXIO);
@ -102,7 +102,7 @@ OF_decode_addr(phandle_t node, int *space, bus_addr_t *addr)
/* Find the topmost PCI node (the host bridge) */
while (1) {
pbus = OF_parent(bus);
if (pbus == NULL)
if (pbus == 0)
return (ENXIO);
if (OF_getprop(pbus, "name", name, sizeof(name)) == -1)
return (ENXIO);