From 44ddb0c66aa268f0027665da61273e78c9d748ae Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Jan 2016 22:32:49 -0500 Subject: [PATCH] sim: use STATE_MAGIC helper --- sim/common/ChangeLog | 4 ++++ sim/common/sim-utils.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index f8cdbf4d1b2..8ad6a417351 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2016-01-04 Mike Frysinger + + * sim-utils.c (sim_state_free): Change to STATE_MAGIC. + 2016-01-04 Mike Frysinger * cgen-scache.c (MAX): Delete. diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index d2b5f7c0d03..d11d3b4cd90 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -101,7 +101,7 @@ sim_state_alloc (SIM_OPEN_KIND kind, void sim_state_free (SIM_DESC sd) { - ASSERT (sd->base.magic == SIM_MAGIC_NUMBER); + ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); #ifdef SIM_STATE_FREE SIM_STATE_FREE (sd); -- 2.30.2