]> git.saurik.com Git - redis.git/commitdiff
Fixed a non critical bug signaled by clang static analyzer thanks to Mukund Sivaraman...
authorantirez <antirez@gmail.com>
Wed, 25 Jan 2012 15:46:19 +0000 (16:46 +0100)
committerantirez <antirez@gmail.com>
Wed, 25 Jan 2012 15:46:35 +0000 (16:46 +0100)
src/cluster.c

index 4ccff657363659b4d8c8920e5c07f88aaf791b08..2b3ebe4d07da8d4b75a66288519f2c085e5faf32 100644 (file)
@@ -804,7 +804,7 @@ void clusterBroadcastMessage(void *buf, size_t len) {
 
 /* Build the message header */
 void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
 
 /* Build the message header */
 void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
-    int totlen;
+    int totlen = 0;
 
     memset(hdr,0,sizeof(*hdr));
     hdr->type = htons(type);
 
     memset(hdr,0,sizeof(*hdr));
     hdr->type = htons(type);