File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,11 @@ pub fn timing_safe_cmp(a: &[u8], b: &[u8]) -> bool {
1515 * chance to optimize and fold the code in any way that may change
1616 * the timing.
1717 */
18- let length: Volatile < usize > ;
19- let mut left: Volatile < * const u8 > ;
20- let mut right: Volatile < * const u8 > ;
2118 let mut result: u8 = 0 ;
22-
2319 /* loop count depends on length of b */
24- length = Volatile :: new ( len_b) ;
25- left = Volatile :: new ( std:: ptr:: null ( ) ) ;
26- right = Volatile :: new ( b) ;
20+ let length: Volatile < usize > = Volatile :: new ( len_b) ;
21+ let mut left: Volatile < * const u8 > = Volatile :: new ( std:: ptr:: null ( ) ) ;
22+ let mut right: Volatile < * const u8 > = Volatile :: new ( b) ;
2723
2824 /* don't use else here to keep the amount of CPU instructions constant,
2925 * volatile forces re-evaluation
You can’t perform that action at this time.
0 commit comments