diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-04-10 18:47:23 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-04-11 16:10:46 +0300 |
commit | 3b607b75a345b1d808031bf1bb1038e4dac8d521 (patch) | |
tree | 67c946ca3bf5226fbbb34ae4c5e9278ddb4409ea /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | 818ad0bb4000ac3540bcdc4f50a6e5b509c99ad0 (diff) | |
download | linux-3b607b75a345b1d808031bf1bb1038e4dac8d521.tar.xz |
null_blk: Use strscpy() instead of strscpy_pad() in null_add_dev()
blk_mq_alloc_disk() already zero-initializes the destination buffer,
making strscpy() sufficient for safely copying the disk's name. The
additional NUL-padding performed by strscpy_pad() is unnecessary.
If the destination buffer has a fixed length, strscpy() automatically
determines its size using sizeof() when the argument is omitted. This
makes the explicit size argument unnecessary.
The source string is also NUL-terminated and meets the __must_be_cstr()
requirement of strscpy().
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250410154727.883207-1-thorsten.blum@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions