quicklist: change the len of quicklist to unsigned long

This commit is contained in:
zhaozhao.zz
2017-12-03 11:51:35 +08:00
parent 664bbfe760
commit b9491b65d9
2 changed files with 4 additions and 4 deletions

View File

@ -393,13 +393,13 @@ void debugCommand(client *c) {
val = dictGetVal(de);
strenc = strEncoding(val->encoding);
char extra[128] = {0};
char extra[138] = {0};
if (val->encoding == OBJ_ENCODING_QUICKLIST) {
char *nextra = extra;
int remaining = sizeof(extra);
quicklist *ql = val->ptr;
/* Add number of quicklist nodes */
int used = snprintf(nextra, remaining, " ql_nodes:%u", ql->len);
int used = snprintf(nextra, remaining, " ql_nodes:%lu", ql->len);
nextra += used;
remaining -= used;
/* Add average quicklist fill factor */