l -= k;
total += k;
}
- if (check && l)
- if (check == 2)
- die("breada: short read");
- else if (total)
- die("breadb: short read");
+ if (check && total && l)
+ die("breadb: short read");
return total;
}
-void bwrite_slow(struct fastbuf *f, void *b, uns l)
+void bwrite_slow(struct fastbuf *f, const void *b, uns l)
{
while (l)
{