Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
847a4080
Commit
847a4080
authored
Nov 20, 2012
by
charsyam
Committed by
antirez
Jul 02, 2013
Browse files
fix randstring bug
parent
aaf56235
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ziplist.c
View file @
847a4080
...
...
@@ -1041,7 +1041,8 @@ void pop(unsigned char *zl, int where) {
}
int
randstring
(
char
*
target
,
unsigned
int
min
,
unsigned
int
max
)
{
int
p
,
len
=
min
+
rand
()
%
(
max
-
min
+
1
);
int
p
=
0
;
int
len
=
min
+
rand
()
%
(
max
-
min
+
1
);
int
minval
,
maxval
;
switch
(
rand
()
%
3
)
{
case
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment