From 84403fe7c1ab582c1fff4ddb5d933ba1a5f61759 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Tue, 7 Sep 2010 00:08:42 +0200 Subject: [PATCH] Allow a random seed argument for the ziplist test binary --- src/ziplist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ziplist.c b/src/ziplist.c index f1069e413..5254423d9 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); -- GitLab