From 3d01638da00b746aa2d6e0d118e9b2f671215210 Mon Sep 17 00:00:00 2001 From: jlamothe Date: Mon, 13 Nov 2023 04:05:33 +0000 Subject: [PATCH] break a2e_chk_last into separate function --- test/append-test-log.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/append-test-log.c b/test/append-test-log.c index ee35f8b..e548538 100644 --- a/test/append-test-log.c +++ b/test/append-test-log.c @@ -41,6 +41,7 @@ struct LogData static void append_to_empty(TestState *); static void append_to_existing(TestState *); +static void a2e_chk_last(TestState *, LogData *); static void mk_log_data(LogData *); static void chk_ptr_chg( @@ -116,14 +117,19 @@ append_to_existing(TestState *s) &ld.first ); - // last should change + a2e_chk_last(s, &ld); +} + +static void +a2e_chk_last(TestState *s, LogData *ld) +{ print("\t\tlast_log\n"); chk_ptr_chg( s, "\t\t\t", "ERROR: append_test_log(): last_log:", - ld.state.last_log, - &ld.second + ld->state.last_log, + &ld->second ); }