spoon

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

commit a48eacc12642b3595ec998fc3dd1a89986627567
parent 39a4ec480bc9db2e4fca1506856309dc884d1fb9
Author: sin <sin@2f30.org>
Date:   Wed Nov  2 13:43:11 +0000

Use IF_NAMESIZE instead of IFNAMSIZ

The former is defined by POSIX.

Diffstat:
wifi.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, IFNAMSIZ); + strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); ret = ioctl(fd, SIOCGIWNAME, &wrq); if (ret != 0) continue; memset(&wrq, 0, sizeof(wrq)); - strlcpy(wrq.ifr_name, ifa->ifa_name, IFNAMSIZ); + strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); 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, IFNAMSIZ); + strlcpy(wrq.ifr_name, ifa->ifa_name, IF_NAMESIZE); wrq.u.data.pointer = &stats; wrq.u.data.length = sizeof(stats); wrq.u.data.flags = 1;