Skip to content

Commit 5bf8812

Browse files
Use ZEND_LONG_FMT and avoid typecast in hMset (phpredis#1770)
See phpredis#1764
1 parent f9c7bb5 commit 5bf8812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis_commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ int redis_hmset_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
16841684
mem_len = ZSTR_LEN(zkey);
16851685
mem = ZSTR_VAL(zkey);
16861686
} else {
1687-
mem_len = snprintf(kbuf, sizeof(kbuf), "%ld", (long)idx);
1687+
mem_len = snprintf(kbuf, sizeof(kbuf), ZEND_LONG_FMT, idx);
16881688
mem = (char*)kbuf;
16891689
}
16901690

0 commit comments

Comments
 (0)