summaryrefslogtreecommitdiffstats
path: root/libasyncns
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-07-02 03:57:15 +0200
committerLennart Poettering <lennart@poettering.net>2008-07-02 03:57:15 +0200
commitc82b09a7e65d11a5f47e614b0ba434b5d6695e84 (patch)
treeb73689c027b261512f0de2e72f5af09dd1e2b0f6 /libasyncns
parentab6e9734a8db600b9df97b63aa0ddb8b4d52650a (diff)
fix a bit of indentation
Diffstat (limited to 'libasyncns')
-rw-r--r--libasyncns/asyncns.c13
-rw-r--r--libasyncns/asyncns.h3
2 files changed, 6 insertions, 10 deletions
diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c
index e95ce37..08fcd59 100644
--- a/libasyncns/asyncns.c
+++ b/libasyncns/asyncns.c
@@ -351,13 +351,13 @@ static int handle_request(int out_fd, const rheader_t *req, size_t length) {
assert(length >= sizeof(nameinfo_request_t));
assert(length == sizeof(nameinfo_request_t) + ni_req->sockaddr_len);
- memcpy (&sa, (const uint8_t *)req + sizeof(nameinfo_request_t), ni_req->sockaddr_len);
+ memcpy(&sa, (const uint8_t *)req + sizeof(nameinfo_request_t), ni_req->sockaddr_len);
ret = getnameinfo((struct sockaddr *)&sa, ni_req->sockaddr_len,
ni_req->gethost ? hostbuf : NULL, ni_req->gethost ? sizeof(hostbuf) : 0,
ni_req->getserv ? servbuf : NULL, ni_req->getserv ? sizeof(servbuf) : 0,
ni_req->flags);
- printf ("%s %s\n", hostbuf, servbuf);
+ printf("%s %s\n", hostbuf, servbuf);
return send_nameinfo_reply(out_fd, req->id, ret,
ret == 0 && ni_req->gethost ? hostbuf : NULL,
@@ -599,9 +599,8 @@ void asyncns_free(asyncns_t *asyncns) {
#endif
}
- /* Due to Solaris' broken thread cancelation we first send an
- * termination request and then cancel th thread. */
-
+ /* Due to Solaris' broken thread cancelation we first send a
+ * termination request and then cancel the thread. */
for (i = 0; i < 4; i++)
if (asyncns->fds[i] >= 0)
@@ -985,9 +984,7 @@ int asyncns_getnameinfo_done(asyncns_t *asyncns, asyncns_query_t* q, char *ret_h
return ret;
}
-static asyncns_query_t *
-asyncns_res(asyncns_t *asyncns, query_type_t qtype,
- const char *dname, int class, int type) {
+static asyncns_query_t * asyncns_res(asyncns_t *asyncns, query_type_t qtype, const char *dname, int class, int type) {
res_request_t data[BUFSIZE/sizeof(res_request_t) + 1];
res_request_t *req = data;
asyncns_query_t *q;
diff --git a/libasyncns/asyncns.h b/libasyncns/asyncns.h
index 50cb378..a57be52 100644
--- a/libasyncns/asyncns.h
+++ b/libasyncns/asyncns.h
@@ -121,8 +121,7 @@ asyncns_query_t* asyncns_res_search(asyncns_t *asyncns, const char *dname, int c
* may not be used any further. Returns a pointer to the answer of the
* res_query call. If the query is not completed yet -EAGAIN is returned, on
* failure -errno is returned otherwise the length of answer is returned. */
-int asyncns_res_done(asyncns_t *asyncns, asyncns_query_t* q, unsigned char
-**answer);
+int asyncns_res_done(asyncns_t *asyncns, asyncns_query_t* q, unsigned char **answer);
/** Return the next completed query object. If no query has been
* completed yet, return NULL. Please note that you need to run