From 4c15b4e3459311f8d458e0e9c031a473efe5f0b8 Mon Sep 17 00:00:00 2001 From: Nicolas Dato Date: Wed, 2 Jul 2025 23:41:29 -0300 Subject: adding an example, without using libtuberia for now --- src/tuberia.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tuberia.c') diff --git a/src/tuberia.c b/src/tuberia.c index d8b5688..d9af3c8 100644 --- a/src/tuberia.c +++ b/src/tuberia.c @@ -148,8 +148,8 @@ tube *tube_alloc(const tube_source *source, tube_sink sink, void *opaque) for (ctx->nitcs = 1, s = source->next; s != NULL; ctx->nitcs++) { s = s->next; } - ctx->itcs = calloc(ctx->nitcs, sizeof(itc *)); - ctx->free_element = calloc(ctx->nitcs, sizeof(tube_free_element)); + ctx->itcs = (struct itc **)calloc(ctx->nitcs, sizeof(itc *)); + ctx->free_element = (tube_free_element *)calloc(ctx->nitcs, sizeof(tube_free_element)); ctx->itcs[0] = itc_alloc(source->nslots); ctx->free_element[0] = source->free_element; for (i = 1, s = source->next; s != NULL; s = s->next, i++) { -- cgit v1.2.3