Merge pull request #369 from jamel/snprintf

fix snprintf format string
This commit is contained in:
Jan-Erik Rediger 2015-10-18 22:47:57 +02:00
commit 4b3786d57e

View File

@ -57,7 +57,7 @@ int main(int argc, char **argv) {
for (j = 0; j < 10; j++) { for (j = 0; j < 10; j++) {
char buf[64]; char buf[64];
snprintf(buf,64,"%d",j); snprintf(buf,64,"%u",j);
reply = redisCommand(c,"LPUSH mylist element-%s", buf); reply = redisCommand(c,"LPUSH mylist element-%s", buf);
freeReplyObject(reply); freeReplyObject(reply);
} }