[Python-checkins] r42368 - python/trunk/Modules/rotatingtree.c

tim.peters python-checkins at python.org
Wed Feb 15 04:01:31 CET 2006


Author: tim.peters
Date: Wed Feb 15 04:01:30 2006
New Revision: 42368

Modified:
   python/trunk/Modules/rotatingtree.c
Log:
randombits():  Stop compiler warning about mixing
signed with unsigned types in comparison.


Modified: python/trunk/Modules/rotatingtree.c
==============================================================================
--- python/trunk/Modules/rotatingtree.c	(original)
+++ python/trunk/Modules/rotatingtree.c	Wed Feb 15 04:01:30 2006
@@ -15,7 +15,7 @@
 randombits(int bits)
 {
 	int result;
-	if (random_stream < (1<<bits)) {
+	if (random_stream < (1U << bits)) {
 		random_value *= 1082527;
 		random_stream = random_value;
 	}


More information about the Python-checkins mailing list