diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-23 22:05:46 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-23 22:05:46 +0200 |
commit | ff03b72ed5f365a2ca052218e055fac678cf0e23 (patch) | |
tree | 3c6089d3274890bd7e947fbe9369d42481ed5dd5 /sys/src/9/port/devaoe.c | |
parent | 0b3fd7c05208b6de625bb0b4d1719b9fd22156ae (diff) |
devaoe: more nil vs. 0
Diffstat (limited to 'sys/src/9/port/devaoe.c')
-rw-r--r-- | sys/src/9/port/devaoe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/9/port/devaoe.c b/sys/src/9/port/devaoe.c index 7f6a052c0..68d66c25d 100644 --- a/sys/src/9/port/devaoe.c +++ b/sys/src/9/port/devaoe.c @@ -542,7 +542,7 @@ hset(Aoedev *d, Frame *f, Aoehdr *h, int cmd, int new) l = pickdevlink(d); i = pickea(l); if(i == -1){ - if(!(cmd == ACata && f->srb && Nofail(d, s))) + if(!(cmd == ACata && f->srb != nil && Nofail(d, s))) downdev(d, "resend fails; no netlink/ea"); return -1; } @@ -1238,7 +1238,7 @@ rw(Aoedev *d, int write, uchar *db, long len, uvlong off) if(write && !copy) memmove(srb->data, db, n); strategy(d, srb); - if(srb->error) + if(srb->error != nil) error(srb->error); if(!write && !copy) memmove(db, srb->data, n); @@ -1970,7 +1970,7 @@ qcfgrsp(Block *b, Netlink *nl) srb = f->srb; f->dp = nil; f->srb = nil; - if(srb){ + if(srb != nil){ srb->nout--; srbwakeup(srb); d->nout--; @@ -2133,7 +2133,7 @@ atarsp(Block *b) if(ahin->cmdstat & 0xa9){ eventlog("%æ: ata error cmd %.2ux stat %.2ux\n", d, ahout->cmdstat, ahin->cmdstat); - if(srb) + if(srb != nil) srb->error = Eio; } else { n = ahout->scnt * Aoesectsz; @@ -2174,7 +2174,7 @@ atarsp(Block *b) } f->srb = nil; - if(srb){ + if(srb != nil){ srb->nout--; srbwakeup(srb); } |