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
ffe003dc
Commit
ffe003dc
authored
Apr 27, 2012
by
antirez
Browse files
memtest.c fixed to actually use v1 and v2 in memtest_fill_value().
parent
841048f2
Changes
1
Show whitespace changes
Inline
Side-by-side
src/memtest.c
View file @
ffe003dc
...
@@ -132,13 +132,13 @@ void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1,
...
@@ -132,13 +132,13 @@ void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1,
v
=
(
off
&
1
)
?
v2
:
v1
;
v
=
(
off
&
1
)
?
v2
:
v1
;
for
(
w
=
0
;
w
<
iwords
;
w
++
)
{
for
(
w
=
0
;
w
<
iwords
;
w
++
)
{
#ifdef MEMTEST_32BIT
#ifdef MEMTEST_32BIT
*
l1
=
*
l2
=
((
unsigned
long
)
(
rand
()
&
0xffff
)
)
|
*
l1
=
*
l2
=
((
unsigned
long
)
v
)
|
(((
unsigned
long
)
(
rand
()
&
0xffff
)
)
<<
16
);
(((
unsigned
long
)
v
)
<<
16
);
#else
#else
*
l1
=
*
l2
=
((
unsigned
long
)
(
rand
()
&
0xffff
)
)
|
*
l1
=
*
l2
=
((
unsigned
long
)
v
)
|
(((
unsigned
long
)
(
rand
()
&
0xffff
)
)
<<
16
)
|
(((
unsigned
long
)
v
)
<<
16
)
|
(((
unsigned
long
)
(
rand
()
&
0xffff
)
)
<<
32
)
|
(((
unsigned
long
)
v
)
<<
32
)
|
(((
unsigned
long
)
(
rand
()
&
0xffff
)
)
<<
48
);
(((
unsigned
long
)
v
)
<<
48
);
#endif
#endif
l1
+=
step
;
l1
+=
step
;
l2
+=
step
;
l2
+=
step
;
...
...
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