]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fastbuf.h
Renamed memory pool functions to "mp_*", so they don't clobber name space.
[libucw.git] / lib / fastbuf.h
index c62ed4cd470cf2af754ce50b46ee398cfbffb2a3..e215b3ca6c455f54d10aba593e57fa625e9bb76f 100644 (file)
@@ -264,16 +264,17 @@ static inline void bput5(struct fastbuf *f, u64 l)
     bput5_slow(f, l);
 }
 
-void bread_slow(struct fastbuf *f, void *b, uns l);
-static inline void bread(struct fastbuf *f, void *b, uns l)
+uns bread_slow(struct fastbuf *f, void *b, uns l);
+static inline uns bread(struct fastbuf *f, void *b, uns l)
 {
   if (f->bptr + l <= f->bstop)
     {
       memcpy(b, f->bptr, l);
       f->bptr += l;
+      return l;
     }
   else
-    bread_slow(f, b, l);
+    return bread_slow(f, b, l);
 }
 
 void bwrite_slow(struct fastbuf *f, void *b, uns l);