made nbits a long
authorceriel <none@none>
Mon, 13 Jun 1988 17:57:39 +0000 (17:57 +0000)
committerceriel <none@none>
Mon, 13 Jun 1988 17:57:39 +0000 (17:57 +0000)
mach/proto/as/comm1.h
mach/proto/as/comm7.c

index 795a58c..f917bde 100644 (file)
@@ -80,7 +80,7 @@ extern item_t *fb_ptr[4*FB_SIZE];
 #ifdef THREE_PASS
 extern char    bittab[BITMAX>>3];
                                /* one bit per small-large decision */
-extern short   nbits;          /* number of decisions so far */
+extern long    nbits;          /* number of decisions so far */
 #endif
 
 #ifdef LISTING
index 86e949f..cf26d66 100644 (file)
@@ -179,15 +179,14 @@ small(fitsmall, gain)
                nosect();
        if (bflag)
                return(0);
-       if ((bit = nbits++) >= BITMAX) {
-               if (bit != BITMAX)
-                       nbits--;        /* prevent wraparound */
+       if (nbits == BITMAX) {
                else if (pass == PASS_1)
                        warning("bit table overflow");
                return(0);
        }
-       p = &bittab[bit>>3];
-       bit = 1 << (bit&7);
+       p = &bittab[(int) (nbits>>3)];
+       bit = 1 << ((int)nbits&7);
+       nbits++;
        switch (pass) {
        case PASS_1:
                return(0);