2010/12/18 Daniel Stenberg wrote:
> mx_curr->priority = ntohs (*((unsigned short *)vptr));
> [...]
> mx_curr->priority = (vptr[0] << 8) | vptr[1];
>
> Any objections or suggestions on a different approach?
Macro DNS__16BIT(p) from ares_dns.h does exactly that, fetch a 16bit
network-order provided integer.
mx_curr->priority = DNS__16BIT(vptr);
-- -=[Yang]=-Received on 2010-12-18