Skip to content

Commit 32ebcda

Browse files
committed
tests: internal: input_chunk: remove unused code
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 98009ae commit 32ebcda

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

tests/internal/input_chunk.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -309,42 +309,6 @@ void flb_test_input_chunk_dropping_chunks()
309309
flb_destroy(ctx);
310310
}
311311

312-
/*
313-
* When chunk is set to DOWN from memory, data_size is set to 0 and
314-
* cio_chunk_get_content_size(1) returns the data_size. fs_chunks_size
315-
* is used to track the size of chunks in filesystem so we need to call
316-
* cio_chunk_get_real_size to return the original size in the file system
317-
*/
318-
static ssize_t flb_input_chunk_get_real_size(struct flb_input_chunk *ic)
319-
{
320-
ssize_t meta_size;
321-
ssize_t size;
322-
323-
size = cio_chunk_get_real_size(ic->chunk);
324-
325-
if (size != 0) {
326-
return size;
327-
}
328-
329-
// Real size is not synced to chunk yet
330-
size = flb_input_chunk_get_size(ic);
331-
if (size == 0) {
332-
flb_debug("[input chunk] no data in the chunk %s",
333-
flb_input_chunk_get_name(ic));
334-
return -1;
335-
}
336-
337-
meta_size = cio_meta_size(ic->chunk);
338-
size += meta_size
339-
/* See https://github.com/edsiper/chunkio#file-layout for more details */
340-
+ 2 /* HEADER BYTES */
341-
+ 4 /* CRC32 */
342-
+ 16 /* PADDING */
343-
+ 2; /* METADATA LENGTH BYTES */
344-
345-
return size;
346-
}
347-
348312
static int gen_buf(msgpack_sbuffer *mp_sbuf, char *buf, size_t buf_size)
349313
{
350314
msgpack_unpacked result;

0 commit comments

Comments
 (0)