Introduction
Introduction Statistics Contact Development Disclaimer Help
Use IF_NAMESIZE instead of IFNAMSIZ - spoon - set dwm status
git clone git://git.codemadness.org/spoon
Log
Files
Refs
LICENSE
---
commit a48eacc12642b3595ec998fc3dd1a89986627567
parent 39a4ec480bc9db2e4fca1506856309dc884d1fb9
Author: sin <[email protected]>
Date: Wed, 2 Nov 2016 13:43:11 +0000
Use IF_NAMESIZE instead of IFNAMSIZ
The former is defined by POSIX.
Diffstat:
M 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;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.