mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Cluster: use 'else if' for mutually exclusive conditionals.
This commit is contained in:
parent
db7c17e969
commit
66144337bf
@ -781,14 +781,12 @@ int clusterProcessPacket(clusterLink *link) {
|
|||||||
explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
||||||
explen += (sizeof(clusterMsgDataGossip)*count);
|
explen += (sizeof(clusterMsgDataGossip)*count);
|
||||||
if (totlen != explen) return 1;
|
if (totlen != explen) return 1;
|
||||||
}
|
} else if (type == CLUSTERMSG_TYPE_FAIL) {
|
||||||
if (type == CLUSTERMSG_TYPE_FAIL) {
|
|
||||||
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
||||||
|
|
||||||
explen += sizeof(clusterMsgDataFail);
|
explen += sizeof(clusterMsgDataFail);
|
||||||
if (totlen != explen) return 1;
|
if (totlen != explen) return 1;
|
||||||
}
|
} else if (type == CLUSTERMSG_TYPE_PUBLISH) {
|
||||||
if (type == CLUSTERMSG_TYPE_PUBLISH) {
|
|
||||||
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
|
||||||
|
|
||||||
explen += sizeof(clusterMsgDataPublish) +
|
explen += sizeof(clusterMsgDataPublish) +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user