ifplugd: tiny shrink
This commit is contained in:
parent
f4e4563fe7
commit
80e57eb7d5
@ -222,7 +222,7 @@ static int network_ioctl(int request, void* data)
|
|||||||
static void set_ifreq_to_ifname(struct ifreq *ifreq)
|
static void set_ifreq_to_ifname(struct ifreq *ifreq)
|
||||||
{
|
{
|
||||||
memset(ifreq, 0, sizeof(struct 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)
|
static const char *strstatus(int status)
|
||||||
@ -389,7 +389,7 @@ static smallint detect_link_wlan(void)
|
|||||||
uint8_t mac[ETH_ALEN];
|
uint8_t mac[ETH_ALEN];
|
||||||
|
|
||||||
memset(&iwrequest, 0, sizeof(struct iwreq));
|
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) {
|
if (network_ioctl(SIOCGIWAP, &iwrequest) < 0) {
|
||||||
bb_perror_msg("SIOCGIWAP failed");
|
bb_perror_msg("SIOCGIWAP failed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user