Skip to content

Commit dcde933

Browse files
committed
Fix printf format warnings
1 parent 88d05e7 commit dcde933

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cluster_library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ static int cluster_map_slots(redisCluster *c, clusterReply *r) {
703703
port = (unsigned short)r3->element[1]->integer;
704704

705705
// If the node is new, create and add to nodes. Otherwise use it.
706-
klen = snprintf(key,sizeof(key),"%s:%ld",host,port);
706+
klen = snprintf(key, sizeof(key), "%s:%d", host, port);
707707
if ((pnode = zend_hash_str_find_ptr(c->nodes, key, klen)) == NULL) {
708708
master = cluster_node_create(c, host, hlen, port, low, 0);
709709
zend_hash_str_update_ptr(c->nodes, key, klen, master);
@@ -1266,7 +1266,7 @@ static void cluster_update_slot(redisCluster *c TSRMLS_DC) {
12661266
c->redir_port, c->redir_slot, 0);
12671267

12681268
/* Our node is new, so keep track of it for cleanup */
1269-
klen = snprintf(key,sizeof(key),"%s:%ld",c->redir_host,c->redir_port);
1269+
klen = snprintf(key, sizeof(key), "%s:%d", c->redir_host, c->redir_port);
12701270
zend_hash_str_update_ptr(c->nodes, key, klen, node);
12711271

12721272
/* Now point our slot at the node */

0 commit comments

Comments
 (0)