From be8815e2b737747b51226613d5ca6167a2e4b6a3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 13 Jun 1988 17:57:39 +0000 Subject: [PATCH] made nbits a long --- mach/proto/as/comm1.h | 2 +- mach/proto/as/comm7.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mach/proto/as/comm1.h b/mach/proto/as/comm1.h index 795a58c67..f917bdeac 100644 --- a/mach/proto/as/comm1.h +++ b/mach/proto/as/comm1.h @@ -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 diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index 86e949fb5..cf26d6678 100644 --- a/mach/proto/as/comm7.c +++ b/mach/proto/as/comm7.c @@ -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); -- 2.34.1