summaryrefslogtreecommitdiffstats
path: root/libasyncns
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-07-27 19:02:12 +0200
committerLennart Poettering <lennart@poettering.net>2008-07-27 19:02:12 +0200
commitdbb7ef0403cc5588172c2c11bec12e1fab6dafca (patch)
tree9a8a5d9b11f5e0148460649f12956c4282eeb998 /libasyncns
parente8ed1184ef3ac93fed87c51337af4452a14ca68d (diff)
beautify enum usage a bit
Diffstat (limited to 'libasyncns')
-rw-r--r--libasyncns/asyncns.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c
index b24ea41..1b10b96 100644
--- a/libasyncns/asyncns.c
+++ b/libasyncns/asyncns.c
@@ -71,7 +71,8 @@ enum {
REQUEST_RECV_FD = 0,
REQUEST_SEND_FD = 1,
RESPONSE_RECV_FD = 2,
- RESPONSE_SEND_FD = 3
+ RESPONSE_SEND_FD = 3,
+ MESSAGE_FD_MAX = 4
};
struct asyncns {
@@ -773,10 +774,7 @@ void asyncns_free(asyncns_t *asyncns) {
#endif
}
- /* Due to Solaris' broken thread cancelation we first send a
- * termination request and then cancel the thread. */
-
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MESSAGE_FD_MAX; i++)
if (asyncns->fds[i] >= 0)
close(asyncns->fds[i]);