From 1b2faf7409371da71c440704e3a75c34f7a9d750 Mon Sep 17 00:00:00 2001 From: Tomas Valla Date: Sat, 20 Jul 2013 12:00:17 +0200 Subject: [PATCH] ff-varints: Fixed really silly bug in handling fastbufs. Commit d7762233d87dfea537c963e813daba8fa72bf2be from MD2. --- ucw/ff-varint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucw/ff-varint.h b/ucw/ff-varint.h index 3228fbfa..29132679 100644 --- a/ucw/ff-varint.h +++ b/ucw/ff-varint.h @@ -26,8 +26,8 @@ static inline u64 bget_varint_repl(struct fastbuf *b, u64 repl) if (bavailr(b) >= 1) { l = varint_len(*b->bptr); if (bavailr(b) >= l) { - b->bptr += l; varint_get(b->bptr, &repl); + b->bptr += l; return repl; } } @@ -38,7 +38,7 @@ static inline u64 bget_varint_repl(struct fastbuf *b, u64 repl) * Reads u64 encoded as varint from the fastbuf b. * If the read is unsuccessful, returns ~0LLU. **/ -static inline int bget_varint(struct fastbuf *b) +static inline u64 bget_varint(struct fastbuf *b) { return bget_varint_repl(b, ~0LLU); } -- 2.39.2