]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hamradio: Remove unnecessary strscpy_pad() size arguments
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 7 Apr 2025 08:26:07 +0000 (10:26 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Apr 2025 10:38:47 +0000 (12:38 +0200)
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 <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250407082607.741919-2-thorsten.blum@linux.dev
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/hamradio/baycom_epp.c

index 9e366f275406ddad1ecb7dac25c1a140cefa808e..5fda7a0fcce061c2a3ab48281917fe036d6023d8 100644 (file)
@@ -1074,7 +1074,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
                return 0;
 
        case HDLCDRVCTL_DRIVERNAME:
-               strscpy_pad(hi.data.drivername, "baycom_epp", sizeof(hi.data.drivername));
+               strscpy_pad(hi.data.drivername, "baycom_epp");
                break;
                
        case HDLCDRVCTL_GETMODE:
@@ -1091,8 +1091,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
                return baycom_setmode(bc, hi.data.modename);
 
        case HDLCDRVCTL_MODELIST:
-               strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x",
-                       sizeof(hi.data.modename));
+               strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x");
                break;
 
        case HDLCDRVCTL_MODEMPARMASK: