From acf6aef882eae08d87e353e7c6b33a179f4dea78 Mon Sep 17 00:00:00 2001 From: Bruno George Moraes Date: Fri, 26 Sep 2014 11:00:40 -0300 Subject: 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 --- stream/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'stream/stream.c') 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) -- cgit v1.2.3