Skip to content
This repository
Browse code

memtest.c fixed to actually use v1 and v2 in memtest_fill_value().

  • Loading branch information...
commit 603adb2b2991129fc600c2d8dad549e339873a5b 1 parent 748f206
Salvatore Sanfilippo authored April 27, 2012

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  src/memtest.c
12  src/memtest.c
@@ -132,13 +132,13 @@ void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1,
132 132
         v = (off & 1) ? v2 : v1;
133 133
         for (w = 0; w < iwords; w++) {
134 134
 #ifdef MEMTEST_32BIT
135  
-            *l1 = *l2 = ((unsigned long)     (rand()&0xffff)) |
136  
-                        (((unsigned long)    (rand()&0xffff)) << 16);
  135
+            *l1 = *l2 = ((unsigned long)     v) |
  136
+                        (((unsigned long)    v) << 16);
137 137
 #else
138  
-            *l1 = *l2 = ((unsigned long)     (rand()&0xffff)) |
139  
-                        (((unsigned long)    (rand()&0xffff)) << 16) |
140  
-                        (((unsigned long)    (rand()&0xffff)) << 32) |
141  
-                        (((unsigned long)    (rand()&0xffff)) << 48);
  138
+            *l1 = *l2 = ((unsigned long)     v) |
  139
+                        (((unsigned long)    v) << 16) |
  140
+                        (((unsigned long)    v) << 32) |
  141
+                        (((unsigned long)    v) << 48);
142 142
 #endif
143 143
             l1 += step;
144 144
             l2 += step;

0 notes on commit 603adb2

Please sign in to comment.
Something went wrong with that request. Please try again.