]> granicus.if.org Git - python/commitdiff
randombits(): Stop compiler warning about mixing
authorTim Peters <tim.peters@gmail.com>
Wed, 15 Feb 2006 03:01:30 +0000 (03:01 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 15 Feb 2006 03:01:30 +0000 (03:01 +0000)
signed with unsigned types in comparison.

Modules/rotatingtree.c

index 952725b35a9f39f6cf884e8e8ac0c31fdfe78141..39c6dd53ede34427b2fc0ebc9139755f17a5993d 100644 (file)
@@ -15,7 +15,7 @@ static int
 randombits(int bits)
 {
        int result;
-       if (random_stream < (1<<bits)) {
+       if (random_stream < (1U << bits)) {
                random_value *= 1082527;
                random_stream = random_value;
        }