]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fastbuf.c
In some cases, nextprime(x) could have been equal to x (reported by Milan).
[libucw.git] / lib / fastbuf.c
index 115719422b8844875edefb015f61170297c0494a..b7be624b5645d5ac34e1e52ca83b1ce2a951be62 100644 (file)
@@ -290,7 +290,7 @@ bbcopy_slow(struct fastbuf *f, struct fastbuf *t, uns l)
       uns favail, tavail, n;
 
       favail = bdirect_read_prepare(f, &fptr);
-      if (favail == (uns)EOF)
+      if (!favail)
        die("bbcopy: source exhausted");
       tavail = bdirect_write_prepare(t, &tptr);
       n = MIN(l, favail);