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.

This commit is contained in:
antirez 2012-01-25 16:46:19 +01:00
parent ecc5702145
commit 6710ff24d0

View File

@ -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);