diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-16 12:57:47 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-16 12:57:47 -0400 |
| commit | f9bad6c9d5a5cbfb4dd9d45c55674a58c029c306 (patch) | |
| tree | 6c7b091ac149eb2a52c54485863a952a3d91957a | |
| parent | fa60a725478ca8ebade66a9031488501eb557820 (diff) | |
| download | stasis-f9bad6c9d5a5cbfb4dd9d45c55674a58c029c306.tar.gz | |
Remove sizeof call
| -rw-r--r-- | tests/test_str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_str.c b/tests/test_str.c index 85c8fb9..aac5d71 100644 --- a/tests/test_str.c +++ b/tests/test_str.c @@ -341,7 +341,7 @@ void test_strip() { STASIS_ASSERT(strip(NULL) == NULL, "incorrect return type"); for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) { char *buf = calloc(255, sizeof(*buf)); - strncpy(buf, tc[i].data, sizeof(buf) - 1); + strncpy(buf, tc[i].data, 254); char *result = strip(buf); STASIS_ASSERT(strcmp(result ? result : "", tc[i].expected) == 0, "incorrect strip-from-right"); guard_free(buf); |
