net: fix compiler warning

sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
   48 |   strncpy(arg.ifr_name, ifname, IFNAMSIZ);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-07 19:33:52 +08:00
committed by Xiang Xiao
parent f102f6f405
commit 8ad4ae5508
28 changed files with 182 additions and 130 deletions

View File

@@ -165,7 +165,7 @@ static int _netlib_ipv4adaptor(in_addr_t destipaddr,
/* Get the network mask */
strncpy(maskreq.ifr_name, ifr->ifr_name, IFNAMSIZ);
strlcpy(maskreq.ifr_name, ifr->ifr_name, IFNAMSIZ);
ret = ioctl(sd, SIOCGIFNETMASK, (unsigned long)((uintptr_t)&maskreq));
if (ret < 0)