patch-2.1.30 linux/drivers/char/random.c

Next file: linux/drivers/char/serial.c
Previous file: linux/drivers/char/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/drivers/char/random.c linux/drivers/char/random.c
@@ -1162,7 +1162,7 @@
 		p += bytes;
 		ret += bytes;
 		
-		i = (c+sizeof(__u32)-1) / sizeof(__u32);
+		i = (bytes+sizeof(__u32)-1) / sizeof(__u32);
 		while (i--)
 			add_entropy_word(&random_state, buf[i]);
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov