diff options
author | Bruno George Moraes <brunogm0@gmail.com> | 2014-09-26 11:00:40 -0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-27 16:01:49 +0200 |
commit | acf6aef882eae08d87e353e7c6b33a179f4dea78 (patch) | |
tree | c7ddc80da11f8edd98b61dcdcb9dc4d807c176a3 /stream/stream.c | |
parent | 650af294716e34a3992770aab23aafebb358bac8 (diff) | |
download | mpv-acf6aef882eae08d87e353e7c6b33a179f4dea78.tar.bz2 mpv-acf6aef882eae08d87e353e7c6b33a179f4dea78.tar.xz |
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>
Diffstat (limited to 'stream/stream.c')
-rw-r--r-- | stream/stream.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/stream/stream.c b/stream/stream.c index f551fd89b5..c664173f4e 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -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) |