diff options
-rw-r--r-- | net/ethernet/eth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 215c83986a9d..85e7b4551326 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -367,7 +367,7 @@ struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count) | |||
367 | EXPORT_SYMBOL(alloc_etherdev_mq); | 367 | EXPORT_SYMBOL(alloc_etherdev_mq); |
368 | 368 | ||
369 | static size_t _format_mac_addr(char *buf, int buflen, | 369 | static size_t _format_mac_addr(char *buf, int buflen, |
370 | const unsigned char *addr, int len) | 370 | const unsigned char *addr, int len) |
371 | { | 371 | { |
372 | int i; | 372 | int i; |
373 | char *cp = buf; | 373 | char *cp = buf; |
@@ -376,7 +376,7 @@ static size_t _format_mac_addr(char *buf, int buflen, | |||
376 | cp += scnprintf(cp, buflen - (cp - buf), "%02x", addr[i]); | 376 | cp += scnprintf(cp, buflen - (cp - buf), "%02x", addr[i]); |
377 | if (i == len - 1) | 377 | if (i == len - 1) |
378 | break; | 378 | break; |
379 | cp += strlcpy(cp, ":", buflen - (cp - buf)); | 379 | cp += scnprintf(cp, buflen - (cp - buf), ":"); |
380 | } | 380 | } |
381 | return cp - buf; | 381 | return cp - buf; |
382 | } | 382 | } |
@@ -386,7 +386,7 @@ ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len) | |||
386 | size_t l; | 386 | size_t l; |
387 | 387 | ||
388 | l = _format_mac_addr(buf, PAGE_SIZE, addr, len); | 388 | l = _format_mac_addr(buf, PAGE_SIZE, addr, len); |
389 | l += strlcpy(buf + l, "\n", PAGE_SIZE - l); | 389 | l += scnprintf(buf + l, PAGE_SIZE - l, "\n"); |
390 | return ((ssize_t) l); | 390 | return ((ssize_t) l); |
391 | } | 391 | } |
392 | EXPORT_SYMBOL(sysfs_format_mac); | 392 | EXPORT_SYMBOL(sysfs_format_mac); |