diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-08-12 16:57:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-08-18 07:08:51 +0200 |
commit | 5a8114c6c5a076b43375a98b50cb42f70141b78e (patch) | |
tree | 354ae784053872e0920c1fa0651ff62a638bc056 /testsuites/libtests/ttest01/test-fixture.c | |
parent | rtems/printer.h Fix build warnings -Wclass-memaccess (diff) | |
download | rtems-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.c | 8 |
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 = { |