Re: [PATCH] staging: greybus: documentation: replace strncpy() with strscpy_pad()

From: Dan Carpenter

Date: Tue Oct 14 2025 - 10:15:24 EST


On Tue, Oct 14, 2025 at 10:01:28AM -0400, Vivek BalachandharTN wrote:
> Yes, Dan. Nice catch. Building it with below sample change:
>
> memset(&intf_load.firmware_tag, 0, GB_FIRMWARE_U_TAG_MAX_SIZE);
> strncpy((char *)&intf_load.firmware_tag, firmware_tag,
>         GB_FIRMWARE_U_TAG_MAX_SIZE - 1);

There isn't a need to doing the memset()...

regards,
dan carpenter