diff --git a/src/abort.c b/src/abort.c index 596d9d8..1124244 100644 --- a/src/abort.c +++ b/src/abort.c @@ -25,10 +25,6 @@ jmp_buf g_pre_test; -int setup_abort_test(void) { - return !setjmp(g_pre_test); -} - void criterion_abort_test(void) { longjmp(g_pre_test, 1); } diff --git a/src/abort.h b/src/abort.h index 9eab3d9..064fe67 100644 --- a/src/abort.h +++ b/src/abort.h @@ -29,6 +29,4 @@ extern jmp_buf g_pre_test; -int setup_abort_test(void); - #endif /* !ABORT_H_ */ diff --git a/src/runner.c b/src/runner.c index c752d86..f149e1d 100644 --- a/src/runner.c +++ b/src/runner.c @@ -184,7 +184,7 @@ static void run_test_child(struct criterion_test *test, send_event(PRE_TEST, NULL, 0); struct timespec_compat ts; - if (setup_abort_test()) { + if (!setjmp(g_pre_test)) { timer_start(&ts); (test->test ? test->test : nothing)(); }