projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
169d2ef
)
Allow a random seed argument for the ziplist test binary
author
Pieter Noordhuis
<pcnoordhuis@gmail.com>
Mon, 6 Sep 2010 22:08:42 +0000
(
00:08
+0200)
committer
Pieter Noordhuis
<pcnoordhuis@gmail.com>
Mon, 6 Sep 2010 22:08:42 +0000
(
00:08
+0200)
src/ziplist.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ziplist.c
b/src/ziplist.c
index f1069e413c7a5216b08069d104e4b2ed310dd2c6..5254423d9b3dfbad5612de0750193adaa8a2bc2f 100644
(file)
--- 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);