diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-30 22:49:48 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-05-05 09:35:51 +0100 |
commit | d385a60571487d9409f247d07aac94d1ee40f9fe (patch) | |
tree | bac12f154f3f1d0a37618264a65e3c81e29927a4 /target/arm/machine.c | |
parent | 87c3f0f2f791094adce2b8643d9103dac1b59702 (diff) |
target/arm: Avoid bare abort() or assert(0)
Standardize on g_assert_not_reached() for "should not happen".
Retain abort() when preceeded by fprintf or error_report.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220501055028.646596-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/machine.c')
-rw-r--r-- | target/arm/machine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/arm/machine.c b/target/arm/machine.c index 135d2420b5..285e387d2c 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -661,7 +661,7 @@ static int cpu_pre_save(void *opaque) if (kvm_enabled()) { if (!write_kvmstate_to_list(cpu)) { /* This should never fail */ - abort(); + g_assert_not_reached(); } /* @@ -672,7 +672,7 @@ static int cpu_pre_save(void *opaque) } else { if (!write_cpustate_to_list(cpu, false)) { /* This should never fail. */ - abort(); + g_assert_not_reached(); } } |