2024-03-19 09:11:48

by Maarten Brock

[permalink] [raw]
Subject: RE: [PATCH] tty: n_gsm: replace deprecated strncpy with strscpy

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