]> git.saurik.com Git - redis.git/commitdiff
portability fix in redis benchmark, using zu format specified with size_t instead...
authorantirez <antirez@gmail.com>
Mon, 24 Jan 2011 09:05:42 +0000 (10:05 +0100)
committerantirez <antirez@gmail.com>
Mon, 24 Jan 2011 09:05:42 +0000 (10:05 +0100)
src/redis-benchmark.c

index 407c7fb489a3991be870861aaed1e6090e6afd7b..618d9c030a8e761956514f070b305c861bd9eb86 100644 (file)
@@ -143,7 +143,7 @@ static void randomizeClientKey(client c) {
 
     for (i = 0; i < c->randlen; i++) {
         r = random() % config.randomkeys_keyspacelen;
-        snprintf(buf,sizeof(buf),"%012lu",r);
+        snprintf(buf,sizeof(buf),"%012zu",r);
         memcpy(c->randptr[i],buf,12);
     }
 }