summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/ttest01/test-fixture.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-12 16:57:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-18 07:08:51 +0200
commit5a8114c6c5a076b43375a98b50cb42f70141b78e (patch)
tree354ae784053872e0920c1fa0651ff62a638bc056 /testsuites/libtests/ttest01/test-fixture.c
parentrtems/printer.h Fix build warnings -Wclass-memaccess (diff)
downloadrtems-5a8114c6c5a076b43375a98b50cb42f70141b78e.tar.bz2
libtest: Change fixture scope method
Return the produced character count. There is no need for a NUL termination. Update #3199.
Diffstat (limited to '')
-rw-r--r--testsuites/libtests/ttest01/test-fixture.c8
1 files changed, 4 insertions, 4 deletions
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 = {