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.
This commit is contained in:
@@ -83,8 +83,6 @@ stream_err_t stream_init_file(stream_t *stream, const char *name, FILE *pipe)
|
|||||||
stream->name = name;
|
stream->name = name;
|
||||||
stream->pipe.file = pipe;
|
stream->pipe.file = pipe;
|
||||||
|
|
||||||
vec_init(&stream->pipe.cache, STREAM_DEFAULT_CHUNK);
|
|
||||||
|
|
||||||
return STREAM_ERR_OK;
|
return STREAM_ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user