Don't confuse NULL with 0.
This commit is contained in:
parent
f01ac8a3dd
commit
8ae025dbda
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123866
@ -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)),
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user