From 54acc8f08759713338b6cb6c94916438bbd91b80 Mon Sep 17 00:00:00 2001 From: Justin Brewer Date: Tue, 27 Mar 2018 13:44:01 -0500 Subject: Remove redundant zero stores calloc is guaranteed to provide a zero-initialized buffer. There is no need to set fields to zero explicitly. Signed-off-by: Justin Brewer --- hiredis.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'hiredis.c') diff --git a/hiredis.c b/hiredis.c index f119d50..8eabac0 100644 --- a/hiredis.c +++ b/hiredis.c @@ -596,14 +596,8 @@ static redisContext *redisContextInit(void) { if (c == NULL) return NULL; - c->err = 0; - c->errstr[0] = '\0'; c->obuf = sdsempty(); c->reader = redisReaderCreate(); - c->tcp.host = NULL; - c->tcp.source_addr = NULL; - c->unix_sock.path = NULL; - c->timeout = NULL; if (c->obuf == NULL || c->reader == NULL) { redisFree(c); -- cgit v1.2.3