summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_send.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2001-02-28 15:47:47 +0000
committerjlemon <jlemon@FreeBSD.org>2001-02-28 15:47:47 +0000
commitf962d0dc9bf93bd17bba71c678864e50b6d118e2 (patch)
tree74df702fb584bf7ee2eb4110305621cbc3398708 /lib/libc/net/res_send.c
parente7ebccfa375aa4047a0c1bbc773b52da6fa797e2 (diff)
downloadFreeBSD-src-f962d0dc9bf93bd17bba71c678864e50b6d118e2.zip
FreeBSD-src-f962d0dc9bf93bd17bba71c678864e50b6d118e2.tar.gz
Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use. This should fix the problem with DNS. Pointy hat to: me
Diffstat (limited to 'lib/libc/net/res_send.c')
-rw-r--r--lib/libc/net/res_send.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c
index 4173f65..3513a49 100644
--- a/lib/libc/net/res_send.c
+++ b/lib/libc/net/res_send.c
@@ -714,11 +714,9 @@ read_len:
res_close();
goto next_ns;
}
-
- kv.ident = s;
- kv.flags = EV_ADD | EV_ONESHOT;
- kv.filter = EVFILT_READ;
-
+
+ EV_SET(&kv, s, EVFILT_READ, EV_ADD | EV_ONESHOT, 0,0,0);
+
n = _kevent(kq, &kv, 1, &kv, 1, &timeout);
if (n < 0) {
if (errno == EINTR)
OpenPOWER on IntegriCloud