Re: [PATCH] IB/qib: replace deprecated strncpy

From: Leon Romanovsky
Date: Fri Sep 22 2023 - 06:30:06 EST



On Thu, 21 Sep 2023 07:58:48 +0000, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1]
> and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We know `txselect_list` is expected to be NUL-terminated based on its
> use in `param_get_string()`:
> | int param_get_string(char *buffer, const struct kernel_param *kp)
> | {
> | const struct kparam_string *kps = kp->str;
> | return scnprintf(buffer, PAGE_SIZE, "%s\n", kps->string);
> | }
>
> [...]

Applied, thanks!

[1/1] IB/qib: replace deprecated strncpy
https://git.kernel.org/rdma/rdma/c/cb7ab7854bc709

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>