diff options
author | Justin Brewer <jzb0012@auburn.edu> | 2018-03-27 13:44:01 -0500 |
---|---|---|
committer | Justin Brewer <jzb0012@auburn.edu> | 2018-04-30 21:45:13 -0500 |
commit | 54acc8f08759713338b6cb6c94916438bbd91b80 (patch) | |
tree | b53f9b13f6cb66c130c331abf6d1f88d5c591dcc /hiredis.c | |
parent | 546d9415e1806565b6c8f413c8873726c6aa049f (diff) |
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 <jzb0012@auburn.edu>
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -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); |