diff options
| author | Ian Bridges <icb@fastmail.org> | 2026-07-03 07:12:46 -0500 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2026-07-06 09:31:33 -0600 |
| commit | f47180b0e9cc59e1989adb093a4b94187642b405 (patch) | |
| tree | 5c61c7f56ac876baae916ad80e77982b8cbcd2c9 /scripts/Makefile.thinlto | |
| parent | 483cd4bdd077e6f5342d32ecc6517b0a39be235f (diff) | |
| download | linux-next-f47180b0e9cc59e1989adb093a4b94187642b405.tar.gz linux-next-f47180b0e9cc59e1989adb093a4b94187642b405.zip | |
kunit: string-stream: Replace strlcat() with strscpy() and seq_buf
In preparation for removing the strlcat() API[1], replace its uses in
string-stream.
string_stream_vadd() appends at most a single newline into space that
was explicitly reserved when the fragment was sized, so a bounded copy
at the end of the string is enough. The return value of strscpy()
keeps the length accounting unchanged. string_stream_get_string()
concatenates a variable number of fragments into a buffer sized to
hold them all, which is what seq_buf is for.
Link: https://lore.kernel.org/r/akenPvVk1xr_-480@dev
Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Reviewed-by: David Gow <david@davidgow.net>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
