X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/8dd162d3ff10fd7fb6f748a885f8055232691c48..c70fdfcd207a394121c7dac271bbd04ce2a91c98:/src/conflicts.c diff --git a/src/conflicts.c b/src/conflicts.c index 73ad45e9..ede39690 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with Bison; see the file COPYING. If not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include "system.h" @@ -38,7 +38,7 @@ /* -1 stands for not specified. */ int expected_sr_conflicts = -1; int expected_rr_conflicts = -1; -static char *conflicts = NULL; +static char *conflicts; struct obstack solved_conflicts_obstack; static bitset shift_set; @@ -305,9 +305,9 @@ conflicts_solve (void) { state_number i; /* List of look-ahead tokens on which we explicitly raise a syntax error. */ - symbol **errors = MALLOC (errors, ntokens + 1); + symbol **errors = xnmalloc (ntokens + 1, sizeof *errors); - CALLOC (conflicts, nstates); + conflicts = xcalloc (nstates, sizeof *conflicts); shift_set = bitset_create (ntokens, BITSET_FIXED); look_ahead_set = bitset_create (ntokens, BITSET_FIXED); obstack_init (&solved_conflicts_obstack); @@ -488,9 +488,9 @@ conflicts_print (void) expected_rr_conflicts = -1; } - src_ok = + src_ok = src_total == (expected_sr_conflicts == -1 ? 0 : expected_sr_conflicts); - rrc_ok = + rrc_ok = rrc_total == (expected_rr_conflicts == -1 ? 0 : expected_rr_conflicts); /* If there are as many RR conflicts and SR conflicts as @@ -522,7 +522,7 @@ conflicts_print (void) void conflicts_free (void) { - XFREE (conflicts); + free (conflicts); bitset_free (shift_set); bitset_free (look_ahead_set); obstack_free (&solved_conflicts_obstack, NULL);