From 6710ff24d067d56b6b8d768532a6a7d3c4bc7a80 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 25 Jan 2012 16:46:19 +0100 Subject: [PATCH] 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. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2