Commit c8a8df49 authored by Thorsten Blum's avatar Thorsten Blum Committed by Bjorn Andersson
Browse files

rpmsg: Use strscpy() instead of strscpy_pad()



kzalloc() already zero-initializes the destination buffer, making
strscpy() sufficient for safely copying the name. The additional NUL-
padding performed by strscpy_pad() is unnecessary.

The size parameter is optional, and strscpy() automatically determines
the size of the destination buffer using sizeof() when the argument is
omitted. RPMSG_NAME_SIZE is equal to sizeof(rpdev->id.name) and can be
removed - remove it.

No functional changes intended.

Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250429104543.66927-2-thorsten.blum@linux.dev


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 214ae22e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment