提交 66144337 编写于 作者: A antirez

Cluster: use 'else if' for mutually exclusive conditionals.

上级 db7c17e9
......@@ -781,14 +781,12 @@ int clusterProcessPacket(clusterLink *link) {
explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
explen += (sizeof(clusterMsgDataGossip)*count);
if (totlen != explen) return 1;
}
if (type == CLUSTERMSG_TYPE_FAIL) {
} else if (type == CLUSTERMSG_TYPE_FAIL) {
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
explen += sizeof(clusterMsgDataFail);
if (totlen != explen) return 1;
}
if (type == CLUSTERMSG_TYPE_PUBLISH) {
} else if (type == CLUSTERMSG_TYPE_PUBLISH) {
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
explen += sizeof(clusterMsgDataPublish) +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册