From 8d3f4f896f96df8b4654a4c9dd40ab9aba7acf7f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 5 Feb 2026 18:53:13 +0000 Subject: [PATCH] stream: do not initialise file streams with a non-empty vector Because of the not_inlined trick, a 0 initialised SBO vector is completely valid to use if required. Future /vec_ensure/'s will deal with it appropriately. So there's no need to initialise the vector ahead of time like this. --- src/stream.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/stream.c b/src/stream.c index 15b01bf..687fc67 100644 --- a/src/stream.c +++ b/src/stream.c @@ -83,8 +83,6 @@ stream_err_t stream_init_file(stream_t *stream, const char *name, FILE *pipe) stream->name = name; stream->pipe.file = pipe; - vec_init(&stream->pipe.cache, STREAM_DEFAULT_CHUNK); - return STREAM_ERR_OK; }