summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares_parse_mx_reply.c4
-rw-r--r--ares_parse_srv_reply.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/ares_parse_mx_reply.c b/ares_parse_mx_reply.c
index 186ddd3..2180054 100644
--- a/ares_parse_mx_reply.c
+++ b/ares_parse_mx_reply.c
@@ -47,7 +47,7 @@
int
ares_parse_mx_reply (const unsigned char *abuf, int alen,
- struct ares_mx_reply **mx_out)
+ struct ares_mx_reply **mx_out)
{
unsigned int qdcount, ancount, i;
const unsigned char *aptr, *vptr;
@@ -134,7 +134,7 @@ ares_parse_mx_reply (const unsigned char *abuf, int alen,
mx_last = mx_curr;
vptr = aptr;
- mx_curr->priority = ntohs (*((unsigned short *)vptr));
+ mx_curr->priority = DNS__16BIT(vptr);
vptr += sizeof(unsigned short);
status = ares_expand_name (vptr, abuf, alen, &mx_curr->host, &len);
diff --git a/ares_parse_srv_reply.c b/ares_parse_srv_reply.c
index 7d443b3..9c7eb6e 100644
--- a/ares_parse_srv_reply.c
+++ b/ares_parse_srv_reply.c
@@ -139,11 +139,11 @@ ares_parse_srv_reply (const unsigned char *abuf, int alen,
srv_last = srv_curr;
vptr = aptr;
- srv_curr->priority = ntohs (*((unsigned short *)vptr));
+ srv_curr->priority = DNS__16BIT(vptr);
vptr += sizeof(unsigned short);
- srv_curr->weight = ntohs (*((unsigned short *)vptr));
+ srv_curr->weight = DNS__16BIT(vptr);
vptr += sizeof(unsigned short);
- srv_curr->port = ntohs (*((unsigned short *)vptr));
+ srv_curr->port = DNS__16BIT(vptr);
vptr += sizeof(unsigned short);
status = ares_expand_name (vptr, abuf, alen, &srv_curr->host, &len);