Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
52b52a35
Commit
52b52a35
authored
Nov 20, 2012
by
charsyam
Browse files
fix randstring bug
parent
49b64523
Changes
1
Show whitespace changes
Inline
Side-by-side
src/ziplist.c
View file @
52b52a35
...
...
@@ -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