mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 19:51:22 +00:00
fix sprintf and snprintf format string
There are some cases of printing unsigned integer with %d conversion specificator and vice versa (signed integer with %u specificator). Patch by Sergey Polovko. Backported to Redis from Disque.
This commit is contained in:
@ -516,7 +516,7 @@ void _serverAssertPrintClientInfo(client *c) {
|
||||
if (c->argv[j]->type == OBJ_STRING && sdsEncodedObject(c->argv[j])) {
|
||||
arg = (char*) c->argv[j]->ptr;
|
||||
} else {
|
||||
snprintf(buf,sizeof(buf),"Object type: %d, encoding: %d",
|
||||
snprintf(buf,sizeof(buf),"Object type: %u, encoding: %u",
|
||||
c->argv[j]->type, c->argv[j]->encoding);
|
||||
arg = buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user