From 5a8114c6c5a076b43375a98b50cb42f70141b78e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 12 Aug 2020 16:57:39 +0200 Subject: libtest: Change fixture scope method Return the produced character count. There is no need for a NUL termination. Update #3199. --- testsuites/libtests/ttest01/test-fixture.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testsuites/libtests/ttest01/test-fixture.c') diff --git a/testsuites/libtests/ttest01/test-fixture.c b/testsuites/libtests/ttest01/test-fixture.c index 545fbf19dc..0e97c1c71c 100644 --- a/testsuites/libtests/ttest01/test-fixture.c +++ b/testsuites/libtests/ttest01/test-fixture.c @@ -43,11 +43,11 @@ teardown(void *ctx) T_log(T_QUIET, "teardown end"); } -static void +static size_t scope(void *ctx, char *buf, size_t n) { - strlcpy(buf, "/More", n); + return T_str_copy(buf, "/More", n); } static const T_fixture fixture = { @@ -101,11 +101,11 @@ teardown_2(void *ctx) T_log(T_QUIET, "teardown 2 end"); } -static void +static size_t scope_2(void *ctx, char *buf, size_t n) { - strlcpy(buf, "/AndMore", n); + return T_str_copy(buf, "/AndMore", n); } static const T_fixture fixture_2 = { -- cgit v1.2.3