X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffastbuf.c;h=be7e979015e0f797021cd9eb19c53ea68188f6de;hb=91c499892f07ad6494351a1c1985a0d3e2600a25;hp=4817bab3779095a4ce63bd05a0a00279a2bbe56a;hpb=eea73ef26a06a3b1e4508fa305a0dcaaf03df457;p=libucw.git diff --git a/lib/fastbuf.c b/lib/fastbuf.c index 4817bab3..be7e9790 100644 --- a/lib/fastbuf.c +++ b/lib/fastbuf.c @@ -114,7 +114,7 @@ uns bread_slow(struct fastbuf *f, void *b, uns l, uns check) 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) { @@ -196,7 +196,7 @@ bfilesize(struct fastbuf *f) return 0; sh_off_t pos = btell(f); bflush(f); - if (!f->seek(f, pos, SEEK_END)) + if (!f->seek(f, 0, SEEK_END)) return -1; sh_off_t len = btell(f); bsetpos(f, pos);