aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-02-10 20:39:14 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-18 15:40:12 (GMT)
commite21cecaf543a57e18b747fb98b5f9f5b6216c4c2 (patch)
tree47c2b483d0be834dcc970a59132dcbd099574b41 /src/utils
parent640b0b933a8fea3f2276198c42c8fd60dd39aaa3 (diff)
downloadhostap-e21cecaf543a57e18b747fb98b5f9f5b6216c4c2.zip
hostap-e21cecaf543a57e18b747fb98b5f9f5b6216c4c2.tar.gz
hostap-e21cecaf543a57e18b747fb98b5f9f5b6216c4c2.tar.bz2
kqueue: Use 0 instead of NULL for udata
Use 0 for udata instead of NULL for portability. NetBSD uses uintptr_t, others a pointer. Signed-off-by: Roy Marples <roy@marples.name>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/eloop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/eloop.c b/src/utils/eloop.c
index 831da12..436bc8c 100644
--- a/src/utils/eloop.c
+++ b/src/utils/eloop.c
@@ -239,7 +239,7 @@ static int eloop_sock_queue(int sock, eloop_event_type type)
default:
filter = 0;
}
- EV_SET(&ke, sock, filter, EV_ADD, 0, 0, NULL);
+ EV_SET(&ke, sock, filter, EV_ADD, 0, 0, 0);
if (kevent(eloop.kqueuefd, &ke, 1, NULL, 0, NULL) == -1) {
wpa_printf(MSG_ERROR, "%s: kevent(ADD) for fd=%d failed: %s",
__func__, sock, strerror(errno));
@@ -411,7 +411,7 @@ static void eloop_sock_table_remove_sock(struct eloop_sock_table *table,
os_memset(&eloop.fd_table[sock], 0, sizeof(struct eloop_sock));
#endif /* CONFIG_ELOOP_EPOLL */
#ifdef CONFIG_ELOOP_KQUEUE
- EV_SET(&ke, sock, 0, EV_DELETE, 0, 0, NULL);
+ EV_SET(&ke, sock, 0, EV_DELETE, 0, 0, 0);
if (kevent(eloop.kqueuefd, &ke, 1, NULL, 0, NULL) < 0) {
wpa_printf(MSG_ERROR, "%s: kevent(DEL) for fd=%d failed: %s",
__func__, sock, strerror(errno));
@@ -1333,7 +1333,7 @@ void eloop_wait_for_read_sock(int sock)
kfd = kqueue();
if (kfd == -1)
return;
- EV_SET(&ke1, sock, EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, NULL);
+ EV_SET(&ke1, sock, EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, 0);
kevent(kfd, &ke1, 1, &ke2, 1, NULL);
close(kfd);
#endif /* CONFIG_ELOOP_KQUEUE */