Commit 6e4a94a4d79ff0094c9a9c4b8c0c81fa529aa68d

Thomas de Grivel 2024-08-01T15:20:21

remove duplicate buf_refill

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/libkc3/buf.c b/libkc3/buf.c
index 7184e11..057dd91 100644
--- a/libkc3/buf.c
+++ b/libkc3/buf.c
@@ -518,16 +518,11 @@ sw buf_peek_s64 (s_buf *buf, s64 *p)
 
 sw buf_peek_str (s_buf *buf, const s_str *src)
 {
-  sw r;
   sw size;
   assert(buf);
   assert(src);
   if (! src->size)
     return 0;
-  if ((r = buf_refill(buf, src->size)) < 0)
-    return r;
-  if ((uw) r < src->size)
-    return -1;
   if (buf->rpos > buf->wpos) {
     assert(buf->rpos <= buf->wpos);
     return -1;