spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 44fc6dd75e411a57fda64db17cc060c6cd49b179
parent a48eacc12642b3595ec998fc3dd1a89986627567
Author: sin <sin@2f30.org>
Date:   Wed,  2 Nov 2016 13:47:37 +0000

Revert "Use IF_NAMESIZE instead of IFNAMSIZ"

This reverts commit a48eacc12642b3595ec998fc3dd1a89986627567.

Diffstat:
Mwifi.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/wifi.c b/wifi.c @@ -134,12 +134,12 @@ wifiread(void *arg, char *buf, size_t len) for (ifa = ifas; ifa != NULL; ifa = ifa->ifa_next) { DPRINTF_S(ifa->ifa_name); memset(&wrq, 0, sizeof(wrq)); - strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); + strlcpy(wrq.ifr_name, ifa->ifa_name, IFNAMSIZ); ret = ioctl(fd, SIOCGIWNAME, &wrq); if (ret != 0) continue; memset(&wrq, 0, sizeof(wrq)); - strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); + strlcpy(wrq.ifr_name, ifa->ifa_name, IFNAMSIZ); wrq.u.data.pointer = &range; wrq.u.data.length = sizeof(range); memset(&range, 0, sizeof(range)); @@ -147,7 +147,7 @@ wifiread(void *arg, char *buf, size_t len) if (ret < 0) warnx("cannot get wifi range"); memset(&wrq, 0, sizeof(wrq)); - strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); + strlcpy(wrq.ifr_name, ifa->ifa_name, IFNAMSIZ); wrq.u.data.pointer = &stats; wrq.u.data.length = sizeof(stats); wrq.u.data.flags = 1;