]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Space: Replace memset(0) + strscpy() with strscpy_pad()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 14 Aug 2025 18:05:14 +0000 (20:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Aug 2025 19:37:50 +0000 (12:37 -0700)
commit8159572936392b514e404bab2d60e47cebd5acfe
treeba9cbe1b763241d68b43eccacde1246fa8214bca
parente63b162ef43eeb774edcb688bbf141bb468af485
net: Space: Replace memset(0) + strscpy() with strscpy_pad()

Replace memset(0) followed by strscpy() with strscpy_pad() to improve
netdev_boot_setup_add(). This avoids zeroing the memory before copying
the string and ensures the destination buffer is only written to once,
simplifying the code and improving efficiency.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250814180514.251000-2-thorsten.blum@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/Space.c