From f932f0ed275bf9d6653b11694e39a13f57e7dc54 Mon Sep 17 00:00:00 2001 From: Sergey Polovko Date: Mon, 5 Oct 2015 16:22:00 +0300 Subject: [PATCH] fix snprintf format string --- examples/example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example.c b/examples/example.c index 25226a8..4d494c5 100644 --- a/examples/example.c +++ b/examples/example.c @@ -57,7 +57,7 @@ int main(int argc, char **argv) { for (j = 0; j < 10; j++) { char buf[64]; - snprintf(buf,64,"%d",j); + snprintf(buf,64,"%u",j); reply = redisCommand(c,"LPUSH mylist element-%s", buf); freeReplyObject(reply); }