Cluster: use long long for timestamps in clusterGenNodesDescription().

Ping sent and pong received fields need to be casted to long long to be
printed correctly into 32 bit systems.
This commit is contained in:
antirez 2013-12-17 09:38:11 +01:00
parent 2dfc5e35a9
commit e88e6a6334

View File

@ -2404,9 +2404,9 @@ sds clusterGenNodesDescription(int filter) {
ci = sdscatprintf(ci,"- ");
/* Latency from the POV of this node, link status */
ci = sdscatprintf(ci,"%ld %ld %llu %s",
(long) node->ping_sent,
(long) node->pong_received,
ci = sdscatprintf(ci,"%lld %lld %llu %s",
(long long) node->ping_sent,
(long long) node->pong_received,
(unsigned long long) node->configEpoch,
(node->link || node->flags & REDIS_NODE_MYSELF) ?
"connected" : "disconnected");