diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-09-05 23:24:13 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-09-05 23:24:13 +0300 |
commit | dcde9331670ee65f29e30665fa1b233e473cfade (patch) | |
tree | f73f4e72f03dc116189e9ca6ea50277e618b2277 /cluster_library.c | |
parent | 88d05e7d6e5748774105279d0a3546b4de51bad3 (diff) |
Issue #1399
Fix printf format warnings
Diffstat (limited to 'cluster_library.c')
-rw-r--r-- | cluster_library.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cluster_library.c b/cluster_library.c index 0f4c915a..8f157873 100644 --- a/cluster_library.c +++ b/cluster_library.c @@ -703,7 +703,7 @@ static int cluster_map_slots(redisCluster *c, clusterReply *r) { port = (unsigned short)r3->element[1]->integer; // If the node is new, create and add to nodes. Otherwise use it. - klen = snprintf(key,sizeof(key),"%s:%ld",host,port); + klen = snprintf(key, sizeof(key), "%s:%d", host, port); if ((pnode = zend_hash_str_find_ptr(c->nodes, key, klen)) == NULL) { master = cluster_node_create(c, host, hlen, port, low, 0); zend_hash_str_update_ptr(c->nodes, key, klen, master); @@ -1266,7 +1266,7 @@ static void cluster_update_slot(redisCluster *c TSRMLS_DC) { c->redir_port, c->redir_slot, 0); /* Our node is new, so keep track of it for cleanup */ - klen = snprintf(key,sizeof(key),"%s:%ld",c->redir_host,c->redir_port); + klen = snprintf(key, sizeof(key), "%s:%d", c->redir_host, c->redir_port); zend_hash_str_update_ptr(c->nodes, key, klen, node); /* Now point our slot at the node */ |