lkml.org 
[lkml]   [2024]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/4] selftests/nolibc: Add tests for strlcat() and strlcpy()
From
On 1/29/24 15:15, Rodrigo Campos wrote:
> + /* For functions that take a long buffer, like strlcat() */
> + char buf[7] = "foo";
> +

I've improved this to not be the same length as the other buffer (we
can't catch mistakes like confusing the src and dst buffers like that)
and added some trailing chars, so we also test that the \0 is added at
the exactly right position.

\
 
 \ /
  Last update: 2024-05-27 15:02    [W:0.489 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site