OSDN Git Service

net: nixge: Fix misuse of strlcpy
authorJoe Perches <joe@perches.com>
Thu, 4 Jul 2019 23:57:46 +0000 (16:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jul 2019 02:23:05 +0000 (19:23 -0700)
Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ni/nixge.c

index 96f7a98..0b384f9 100644 (file)
@@ -990,7 +990,7 @@ static void nixge_ethtools_get_drvinfo(struct net_device *ndev,
                                       struct ethtool_drvinfo *ed)
 {
        strlcpy(ed->driver, "nixge", sizeof(ed->driver));
-       strlcpy(ed->bus_info, "platform", sizeof(ed->driver));
+       strlcpy(ed->bus_info, "platform", sizeof(ed->bus_info));
 }
 
 static int nixge_ethtools_get_coalesce(struct net_device *ndev,