glitch :-)

This commit is contained in:
cinap_lenrek 2011-12-12 19:20:40 +01:00
parent 8cb8043d0e
commit 3028437f8b
2 changed files with 3 additions and 2 deletions

View file

@ -402,7 +402,8 @@ vgbeifstat(Ether* edev, void* a, long n, ulong offset)
ctlr = edev->ctlr;
p = smalloc(READSTR);
l = snprint(p+l, READSTR-l, "tx: %uld\n", ctlr->stats.tx);
l = 0;
l += snprint(p+l, READSTR-l, "tx: %uld\n", ctlr->stats.tx);
l += snprint(p+l, READSTR-l, "tx [errs]: %uld\n", ctlr->stats.txe);
l += snprint(p+l, READSTR-l, "rx: %uld\n", ctlr->stats.rx);
l += snprint(p+l, READSTR-l, "intr: %uld\n", ctlr->stats.intr);

View file

@ -1023,7 +1023,7 @@ cryptio(Fsdev *mp, int isread, uchar *a, long l, vlong off)
Maxbuf = 32*Sectsz,
};
if(off < 0 || len <= 0 || ((off|len) & (Sectsz-1)))
if(off < 0 || l <= 0 || ((off|l) & (Sectsz-1)))
error(Ebadarg);
k = mp->extra;