Compare function pointers against 0 rather than nil.

This commit is contained in:
wkj 2004-07-09 01:54:06 +00:00
parent eac9e0183f
commit a87638642c
13 changed files with 15 additions and 15 deletions

View file

@ -66,7 +66,7 @@ mapfile(Fhdr *fp, ulong base, Map *map, Regs **regs)
werrstr("no map");
return -1;
}
if(fp->map == nil){
if(fp->map == 0){
werrstr("cannot load map for this file type");
return -1;
}

View file

@ -287,7 +287,7 @@ mapcoreregs(Fhdr *fp, Map *map, Regs **rp)
UregRegs *r;
elf = fp->elf;
if(elf->coreregs == nil){
if(elf->coreregs == 0){
werrstr("cannot parse %s %s cores", fp->mname, fp->aname);
return -1;
}

View file

@ -40,7 +40,7 @@ addseg(Map *map, Seg seg)
if(ss == nil)
return -1;
map->seg = ss;
if(seg.rw == nil){
if(seg.rw == 0){
if(seg.name && strcmp(seg.name, "zero") == 0)
seg.rw = zerorw;
else if(seg.p)

View file

@ -17,7 +17,7 @@ stabsym(Stab *stabs, int i, StabSym *sym)
werrstr("no stabs");
return -1;
}
if(stabs->e2==nil || stabs->e4==nil){
if(stabs->e2==0 || stabs->e4==0){
werrstr("no data extractors");
return -1;
}

View file

@ -427,7 +427,7 @@ syminit(Fhdr *hdr)
int i;
Symbol *r, *w, *es;
if(hdr->syminit == nil){
if(hdr->syminit == 0){
werrstr("no debugging symbols");
return -1;
}