From a6d62c0eb245875b340f9e3b240f75029319d099 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 22 Dec 2021 21:45:40 -0600 Subject: [PATCH] Update: make the interrupt handler pointer variables constant pointers. --- level_3/fake/c/private-fake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index c2986ee..d9b5f3a 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -497,13 +497,13 @@ extern "C" { return F_interrupt_not; } - f_state_t *state_ptr = (f_state_t *) state; + f_state_t * const state_ptr = (f_state_t *) state; if (!state_ptr->custom) { return F_interrupt_not; } - fake_main_t *main = (fake_main_t *) state_ptr->custom; + fake_main_t * const main = (fake_main_t *) state_ptr->custom; if (!((++main->signal_check) % fake_signal_check_d)) { if (fake_signal_received(main)) { @@ -524,13 +524,13 @@ extern "C" { return F_interrupt_not; } - f_state_t *state_ptr = (f_state_t *) state; + f_state_t * const state_ptr = (f_state_t *) state; if (!state_ptr->custom) { return F_interrupt_not; } - fake_main_t *main = (fake_main_t *) state_ptr->custom; + fake_main_t * const main = (fake_main_t *) state_ptr->custom; if (!((++main->signal_check) % fake_signal_check_d)) { if (fake_signal_received(main)) { -- 1.8.3.1