mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 17:32:09 +08:00
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:
@@ -786,7 +786,7 @@ static int netinit_monitor(void)
|
||||
/* Configure to receive a signal on changes in link status */
|
||||
|
||||
memset(&ifr, 0, sizeof(struct ifreq));
|
||||
strncpy(ifr.ifr_name, NET_DEVNAME, IFNAMSIZ);
|
||||
strlcpy(ifr.ifr_name, NET_DEVNAME, IFNAMSIZ);
|
||||
|
||||
ifr.ifr_mii_notify_event.sigev_notify = SIGEV_SIGNAL;
|
||||
ifr.ifr_mii_notify_event.sigev_signo = CONFIG_NETINIT_SIGNO;
|
||||
|
Reference in New Issue
Block a user