Skip to content

Commit 48afd55

Browse files
tobluxPaolo Abeni
authored andcommitted
hamradio: Remove unnecessary strscpy_pad() size arguments
If the destination buffer has a fixed length, strscpy_pad() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit sizeof() calls unnecessary - remove them. No functional changes intended. Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 61f96e6 commit 48afd55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/hamradio/baycom_epp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
10741074
return 0;
10751075

10761076
case HDLCDRVCTL_DRIVERNAME:
1077-
strscpy_pad(hi.data.drivername, "baycom_epp", sizeof(hi.data.drivername));
1077+
strscpy_pad(hi.data.drivername, "baycom_epp");
10781078
break;
10791079

10801080
case HDLCDRVCTL_GETMODE:
@@ -1091,8 +1091,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
10911091
return baycom_setmode(bc, hi.data.modename);
10921092

10931093
case HDLCDRVCTL_MODELIST:
1094-
strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x",
1095-
sizeof(hi.data.modename));
1094+
strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x");
10961095
break;
10971096

10981097
case HDLCDRVCTL_MODEMPARMASK:

0 commit comments

Comments
 (0)