RE: [PATCH] tty: n_gsm: replace deprecated strncpy with strscpy
From: Maarten Brock
Date: Tue Mar 19 2024 - 05:11:46 EST
Hi Justin,
> ---
> Note: build-tested only.
Really? Without warnings?
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -4010,7 +4010,7 @@ static int gsm_create_network(struct gsm_dlci *dlci,
> struct gsm_netconfig *nc)
> mux_net = netdev_priv(net);
> mux_net->dlci = dlci;
> kref_init(&mux_net->ref);
> - strncpy(nc->if_name, net->name, IFNAMSIZ); /* return net name */
> + strscpy(nc->if_name, net->name); /* return net name */
Where did IFNAMSIZ go?
Kind regards,
Maarten Brock