diff options
author | wkj <devnull@localhost> | 2004-07-09 01:54:06 +0000 |
---|---|---|
committer | wkj <devnull@localhost> | 2004-07-09 01:54:06 +0000 |
commit | a87638642c99d88a3543e0cd5864c9e54133fbee (patch) | |
tree | ccacfd6c58da316c208f1f014be0a15a28cad4b8 | |
parent | eac9e0183f550f950bfcf5cdad959976cbe041ba (diff) | |
download | plan9port-a87638642c99d88a3543e0cd5864c9e54133fbee.tar.gz plan9port-a87638642c99d88a3543e0cd5864c9e54133fbee.tar.bz2 plan9port-a87638642c99d88a3543e0cd5864c9e54133fbee.zip |
Compare function pointers against 0 rather than nil.
-rw-r--r-- | src/cmd/9660/dump9660.c | 2 | ||||
-rw-r--r-- | src/cmd/acme/fsys.c | 2 | ||||
-rw-r--r-- | src/cmd/draw/stats.c | 4 | ||||
-rw-r--r-- | src/cmd/jpg/toico.c | 2 | ||||
-rw-r--r-- | src/cmd/plumb/fsys.c | 2 | ||||
-rw-r--r-- | src/libdraw/ml-lsetrefresh.c | 4 | ||||
-rw-r--r-- | src/libdraw/ml-unload.c | 2 | ||||
-rw-r--r-- | src/libmach/crack.c | 2 | ||||
-rw-r--r-- | src/libmach/crackelf.c | 2 | ||||
-rw-r--r-- | src/libmach/map.c | 2 | ||||
-rw-r--r-- | src/libmach/stabs.c | 2 | ||||
-rw-r--r-- | src/libmach/sym.c | 2 | ||||
-rw-r--r-- | src/libthread/note.c | 2 |
13 files changed, 15 insertions, 15 deletions
diff --git a/src/cmd/9660/dump9660.c b/src/cmd/9660/dump9660.c index 95bba374..b66e3644 100644 --- a/src/cmd/9660/dump9660.c +++ b/src/cmd/9660/dump9660.c @@ -146,7 +146,7 @@ main(int argc, char **argv) /* * Read new files into memory */ - if(rdproto(proto, src, addprotofile, nil, &iroot) < 0) + if(rdproto(proto, src, addprotofile, 0, &iroot) < 0) sysfatal("rdproto: %r"); if(mk9660){ diff --git a/src/cmd/acme/fsys.c b/src/cmd/acme/fsys.c index fb4ae5c4..50e63411 100644 --- a/src/cmd/acme/fsys.c +++ b/src/cmd/acme/fsys.c @@ -156,7 +156,7 @@ fsysproc(void *v) error("convert error in convM2S"); if(DEBUG) fprint(2, "%F\n", &x->fcall); - if(fcall[x->fcall.type] == nil) + if(fcall[x->fcall.type] == 0) x = respond(x, &t, "bad fcall type"); else{ if(x->fcall.type==Tversion || x->fcall.type==Tauth) diff --git a/src/cmd/draw/stats.c b/src/cmd/draw/stats.c index 0d249a8b..2f606467 100644 --- a/src/cmd/draw/stats.c +++ b/src/cmd/draw/stats.c @@ -101,7 +101,7 @@ struct Machine char *menu2str[Nvalue+1]; char xmenu2str[Nvalue+1][40]; -Menu menu2 = {menu2str, nil}; +Menu menu2 = {menu2str, 0}; int present[Nvalue]; Image *cols[Ncolor][3]; Graph *graph; @@ -792,7 +792,7 @@ threadmain(int argc, char *argv[]) for(j=0; j<ngraph; j++) graph[i*ngraph+j].mach = &mach[i]; - if(initdraw(nil, nil, "stats") < 0) + if(initdraw(0, nil, "stats") < 0) sysfatal("initdraw: %r"); colinit(); if((mc = initmouse(nil, screen)) == nil) diff --git a/src/cmd/jpg/toico.c b/src/cmd/jpg/toico.c index 059e018b..da00296e 100644 --- a/src/cmd/jpg/toico.c +++ b/src/cmd/jpg/toico.c @@ -75,7 +75,7 @@ main(int argc, char **argv) }ARGEND; /* read in all the images */ - initdraw(nil, nil, nil); + initdraw(0, nil, nil); if(argc < 1){ readicon("/fd/0"); } else { diff --git a/src/cmd/plumb/fsys.c b/src/cmd/plumb/fsys.c index 0f5bcc89..0ffd5053 100644 --- a/src/cmd/plumb/fsys.c +++ b/src/cmd/plumb/fsys.c @@ -233,7 +233,7 @@ fsysproc(void *v) error("convert error in convM2S"); if(debug) fprint(2, "<= %F\n", t); - if(fcall[t->type] == nil) + if(fcall[t->type] == 0) fsysrespond(t, buf, Ebadfcall); else{ if(t->type==Tversion || t->type==Tauth) diff --git a/src/libdraw/ml-lsetrefresh.c b/src/libdraw/ml-lsetrefresh.c index 17d04cb7..526bd668 100644 --- a/src/libdraw/ml-lsetrefresh.c +++ b/src/libdraw/ml-lsetrefresh.c @@ -10,13 +10,13 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr) Memlayer *l; l = i->layer; - if(l->refreshfn!=nil && fn!=nil){ /* just change functions */ + if(l->refreshfn!=0 && fn!=0){ /* just change functions */ l->refreshfn = fn; l->refreshptr = ptr; return 1; } - if(l->refreshfn == nil){ /* is using backup image; just free it */ + if(l->refreshfn == 0){ /* is using backup image; just free it */ freememimage(l->save); l->save = nil; l->refreshfn = fn; diff --git a/src/libdraw/ml-unload.c b/src/libdraw/ml-unload.c index 23a8b290..b9534117 100644 --- a/src/libdraw/ml-unload.c +++ b/src/libdraw/ml-unload.c @@ -35,7 +35,7 @@ memunload(Memimage *src, Rectangle r, uchar *data, int n) * src is an obscured layer or data is unaligned */ if(dl->save && dx==0){ - if(dl->refreshfn != nil) + if(dl->refreshfn != 0) return -1; /* can't unload window if it's not Refbackup */ if(n > 0) memlhide(src, r); diff --git a/src/libmach/crack.c b/src/libmach/crack.c index 75651897..3dfe254b 100644 --- a/src/libmach/crack.c +++ b/src/libmach/crack.c @@ -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; } diff --git a/src/libmach/crackelf.c b/src/libmach/crackelf.c index b89e1fba..eb99947d 100644 --- a/src/libmach/crackelf.c +++ b/src/libmach/crackelf.c @@ -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; } diff --git a/src/libmach/map.c b/src/libmach/map.c index 2745dd4c..bfb5f722 100644 --- a/src/libmach/map.c +++ b/src/libmach/map.c @@ -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) diff --git a/src/libmach/stabs.c b/src/libmach/stabs.c index d34bb864..18805a51 100644 --- a/src/libmach/stabs.c +++ b/src/libmach/stabs.c @@ -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; } diff --git a/src/libmach/sym.c b/src/libmach/sym.c index 8347630c..b734957f 100644 --- a/src/libmach/sym.c +++ b/src/libmach/sym.c @@ -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; } diff --git a/src/libthread/note.c b/src/libthread/note.c index 55170c75..241c16ff 100644 --- a/src/libthread/note.c +++ b/src/libthread/note.c @@ -58,7 +58,7 @@ delayednotes(Proc *p, void *v) for(n=notes; n<enotes; n++){ if(n->proc == p){ for(i=0; i<NFN; i++){ - if(onnotepid[i]!=p->pid || (fn = onnote[i])==nil) + if(onnotepid[i]!=p->pid || (fn = onnote[i])==0) continue; if((*fn)(v, n->s)) break; |