summaryrefslogtreecommitdiffstats
path: root/libasyncns
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-07-27 19:06:47 +0200
committerLennart Poettering <lennart@poettering.net>2008-07-27 19:06:47 +0200
commit92c9e510532a22e3ef774d7721db37e06c2d775d (patch)
tree80cc2860c8cfa6ac1bb54a5e8d54c3c19bd160d7 /libasyncns
parentea8f3583665aae45273481256cda8a1d8ddd7d69 (diff)
sanitize code a bit
Diffstat (limited to 'libasyncns')
-rw-r--r--libasyncns/asyncns.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c
index afa439f..e66d6f6 100644
--- a/libasyncns/asyncns.c
+++ b/libasyncns/asyncns.c
@@ -530,14 +530,12 @@ static int handle_request(int out_fd, const rheader_t *req, size_t length) {
dname = (const char *) req + sizeof(res_request_t);
- if (req->type == REQUEST_RES_QUERY) {
- ret = res_query(dname, res_req->class, res_req->type,
- (unsigned char *) answer, BUFSIZE);
- } else {
- ret = res_search(dname, res_req->class, res_req->type,
- (unsigned char *)answer, BUFSIZE);
- }
- return send_res_reply(out_fd, req->id, (unsigned char *)answer, ret);
+ if (req->type == REQUEST_RES_QUERY)
+ ret = res_query(dname, res_req->class, res_req->type, (unsigned char *) answer, BUFSIZE);
+ else
+ ret = res_search(dname, res_req->class, res_req->type, (unsigned char *) answer, BUFSIZE);
+
+ return send_res_reply(out_fd, req->id, (unsigned char *) answer, ret);
}
case REQUEST_TERMINATE: {