From: antirez Date: Wed, 25 Jan 2012 15:46:19 +0000 (+0100) Subject: Fixed a non critical bug signaled by clang static analyzer thanks to Mukund Sivaraman... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/6710ff24d067d56b6b8d768532a6a7d3c4bc7a80 Fixed a non critical bug signaled by clang static analyzer thanks to Mukund Sivaraman for reporting it: there was a not initialized field populating the cluster message header, but it is always fixed at later time before sending the packet. --- diff --git a/src/cluster.c b/src/cluster.c index 4ccff657..2b3ebe4d 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -804,7 +804,7 @@ void clusterBroadcastMessage(void *buf, size_t len) { /* Build the message header */ void clusterBuildMessageHdr(clusterMsg *hdr, int type) { - int totlen; + int totlen = 0; memset(hdr,0,sizeof(*hdr)); hdr->type = htons(type);