From: Pieter Noordhuis Date: Mon, 6 Sep 2010 22:08:42 +0000 (+0200) Subject: Allow a random seed argument for the ziplist test binary X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/84403fe7c1ab582c1fff4ddb5d933ba1a5f61759?hp=-c Allow a random seed argument for the ziplist test binary --- 84403fe7c1ab582c1fff4ddb5d933ba1a5f61759 diff --git a/src/ziplist.c b/src/ziplist.c index f1069e41..5254423d 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -870,6 +870,10 @@ int main(int argc, char **argv) { unsigned int elen; long long value; + /* If an argument is given, use it as the random seed. */ + if (argc == 2) + srand(atoi(argv[1])); + zl = createIntList(); ziplistRepr(zl);