X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffastbuf.c;h=dcb8d20dc0fe305b1229b2418ee89390bb4ae0ad;hb=4eb40e82d22f0fda4b807c2e9204e5c0bae1db74;hp=26df0c2f9afb17d202ac08d6809948b7bd633973;hpb=5fce46b8caeab8d51bf16cdc4eaa4bb8d23640dc;p=libucw.git diff --git a/lib/fastbuf.c b/lib/fastbuf.c index 26df0c2f..dcb8d20d 100644 --- a/lib/fastbuf.c +++ b/lib/fastbuf.c @@ -109,11 +109,8 @@ uns bread_slow(struct fastbuf *f, void *b, uns l, uns check) 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; }