aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'ares/ares_query.c')
-rw-r--r--ares/ares_query.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/ares/ares_query.c b/ares/ares_query.c
index 2b832654f..b39dc6d5c 100644
--- a/ares/ares_query.c
+++ b/ares/ares_query.c
@@ -36,7 +36,7 @@ struct qquery {
static void qcallback(void *arg, int status, unsigned char *abuf, int alen);
void ares_query(ares_channel channel, const char *name, int dnsclass,
- int type, ares_callback callback, void *arg)
+ int type, ares_callback callback, void *arg)
{
struct qquery *qquery;
unsigned char *qbuf;
@@ -45,7 +45,7 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
/* Compose the query. */
rd = !(channel->flags & ARES_FLAG_NORECURSE);
status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf,
- &qlen);
+ &qlen);
channel->next_id++;
if (status != ARES_SUCCESS)
{
@@ -85,26 +85,26 @@ static void qcallback(void *arg, int status, unsigned char *abuf, int alen)
/* Convert errors. */
switch (rcode)
- {
- case NOERROR:
- status = (ancount > 0) ? ARES_SUCCESS : ARES_ENODATA;
- break;
- case FORMERR:
- status = ARES_EFORMERR;
- break;
- case SERVFAIL:
- status = ARES_ESERVFAIL;
- break;
- case NXDOMAIN:
- status = ARES_ENOTFOUND;
- break;
- case NOTIMP:
- status = ARES_ENOTIMP;
- break;
- case REFUSED:
- status = ARES_EREFUSED;
- break;
- }
+ {
+ case NOERROR:
+ status = (ancount > 0) ? ARES_SUCCESS : ARES_ENODATA;
+ break;
+ case FORMERR:
+ status = ARES_EFORMERR;
+ break;
+ case SERVFAIL:
+ status = ARES_ESERVFAIL;
+ break;
+ case NXDOMAIN:
+ status = ARES_ENOTFOUND;
+ break;
+ case NOTIMP:
+ status = ARES_ENOTIMP;
+ break;
+ case REFUSED:
+ status = ARES_EREFUSED;
+ break;
+ }
qquery->callback(qquery->arg, status, abuf, alen);
}
free(qquery);