From: Denis Vlasenko Date: Sun, 26 Apr 2009 01:43:36 +0000 (-0000) Subject: ifplugd: tiny shrink X-Git-Tag: 1_15_0~278 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80e57eb7d525803bb776e8294483141756b2b2ef;p=oweals%2Fbusybox.git ifplugd: tiny shrink --- diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 3d7f2a98a..3315e9a4d 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c @@ -222,7 +222,7 @@ static int network_ioctl(int request, void* data) static void set_ifreq_to_ifname(struct ifreq *ifreq) { memset(ifreq, 0, sizeof(struct ifreq)); - strncpy(ifreq->ifr_name, G.iface, IFNAMSIZ); + strncpy_IFNAMSIZ(ifreq->ifr_name, G.iface); } static const char *strstatus(int status) @@ -389,7 +389,7 @@ static smallint detect_link_wlan(void) uint8_t mac[ETH_ALEN]; memset(&iwrequest, 0, sizeof(struct iwreq)); - strncpy(iwrequest.ifr_ifrn.ifrn_name, G.iface, IFNAMSIZ); + strncpy_IFNAMSIZ(iwrequest.ifr_ifrn.ifrn_name, G.iface); if (network_ioctl(SIOCGIWAP, &iwrequest) < 0) { bb_perror_msg("SIOCGIWAP failed");