Skip to contentSkip to conversation

rol32 thinko

PATCH New Matt Mackall 1 participant 1 message Jan 25, 2005 Random number driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rol32 thinko

This thinko.. makes things a bit more arbitrary than we'd like. I've re-audited the other rotate conversions.

drivers/char/random.c +1 -1
Index: rc2mm1/drivers/char/random.c
===================================================================
@@ -474,7 +474,7 @@
 	add_ptr = r->add_ptr;
 
 	while (nwords--) {
-		w = rol32(input_rotate, next_w);
+		w = rol32(next_w, input_rotate);
 		if (nwords > 0)
 			next_w = *in++;
 		i = add_ptr = (add_ptr - 1) & wordmask;
Signature · 1 line
Mathematics is the supreme nostalgia of our time.