mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
string: kunit: Mark nonstring test strings as __nonstring
In preparation for strtomem*() checking that its destination is a __nonstring, annotate "nonstring" and "nonstring_small" variables accordingly. Signed-off-by: Kees Cook <kees@kernel.org>
This commit is contained in:
@@ -579,8 +579,8 @@ static void string_test_strtomem(struct kunit *test)
|
||||
|
||||
static void string_test_memtostr(struct kunit *test)
|
||||
{
|
||||
char nonstring[7] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g' };
|
||||
char nonstring_small[3] = { 'a', 'b', 'c' };
|
||||
char nonstring[7] __nonstring = { 'a', 'b', 'c', 'd', 'e', 'f', 'g' };
|
||||
char nonstring_small[3] __nonstring = { 'a', 'b', 'c' };
|
||||
char dest[sizeof(nonstring) + 1];
|
||||
|
||||
/* Copy in a non-NUL-terminated string into exactly right-sized dest. */
|
||||
|
||||
Reference in New Issue
Block a user