aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-15 12:14:34 +0000
committerYang Tse <yangsita@gmail.com>2007-02-15 12:14:34 +0000
commit7a97e66fb31d1ed8f7c2b2a4f40f401120dd5068 (patch)
tree369e0ec2b4d4180eba491f86cb8256e82d5a2f80
parentd86e6d3ed2cf6422cc3d85433486b97c7c9a99bb (diff)
compiler warning fix
-rw-r--r--ares/ares_dns.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/ares/ares_dns.h b/ares/ares_dns.h
index 3531cd469..a7ae5be17 100644
--- a/ares/ares_dns.h
+++ b/ares/ares_dns.h
@@ -21,12 +21,13 @@
#define DNS__16BIT(p) (((p)[0] << 8) | (p)[1])
#define DNS__32BIT(p) (((p)[0] << 24) | ((p)[1] << 16) | \
((p)[2] << 8) | (p)[3])
-#define DNS__SET16BIT(p, v) (((p)[0] = (unsigned char)((v) >> 8) & 0xff), \
- ((p)[1] = (unsigned char)(v) & 0xff))
-#define DNS__SET32BIT(p, v) (((p)[0] = (unsigned char)((v) >> 24) & 0xff), \
- ((p)[1] = (unsigned char)((v) >> 16) & 0xff), \
- ((p)[2] = (unsigned char)((v) >> 8) & 0xff), \
- ((p)[3] = (unsigned char)(v) & 0xff))
+
+#define DNS__SET16BIT(p, v) (((p)[0] = (unsigned char)(((v) >> 8) & 0xff)), \
+ ((p)[1] = (unsigned char)((v) & 0xff)))
+#define DNS__SET32BIT(p, v) (((p)[0] = (unsigned char)(((v) >> 24) & 0xff)), \
+ ((p)[1] = (unsigned char)(((v) >> 16) & 0xff)), \
+ ((p)[2] = (unsigned char)(((v) >> 8) & 0xff)), \
+ ((p)[3] = (unsigned char)((v) & 0xff)))
#if 0
/* we cannot use this approach on systems where we can't access 16/32 bit