From dbb7ef0403cc5588172c2c11bec12e1fab6dafca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 27 Jul 2008 19:02:12 +0200 Subject: beautify enum usage a bit --- libasyncns/asyncns.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libasyncns') 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]); -- cgit