mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream: change malloc+memset to calloc
Also removed some memset that were left on some calloc that was already in the code. Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
@@ -238,9 +238,7 @@ static bool parse_url(struct stream *st, struct m_config *config)
|
||||
|
||||
static stream_t *new_stream(void)
|
||||
{
|
||||
stream_t *s = talloc_size(NULL, sizeof(stream_t) + TOTAL_BUFFER_SIZE);
|
||||
memset(s, 0, sizeof(stream_t));
|
||||
return s;
|
||||
return talloc_zero_size(NULL, sizeof(stream_t) + TOTAL_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
static const char *match_proto(const char *url, const char *proto)
|
||||
|
||||
Reference in New Issue
Block a user