With no canaries, nothing can be tested, so just reduce this to a trivial
1-line return on the non-DEBUG case.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
enum fatal_test_state fatal_data_stack(int stage)
{
+#ifdef DEBUG
/* If we abort, then we'll be left with a dangling t_push()
keep a record of our temporary stack id, so we can clean up. */
static unsigned int t_id = 999999999;
}
switch(stage) {
-#ifdef DEBUG
case 0: {
unsigned char *p;
test_begin("fatal data-stack underrun");
return FATAL_TEST_FAILURE;
}
-#endif
default:
things_are_messed_up = TRUE;
return FATAL_TEST_FINISHED;
}
+#else
+ return stage == 0 ? FATAL_TEST_FINISHED : FATAL_TEST_ABORT;
+#endif
}