-#define NS_GET16(s, cp) do { \
- register const unsigned char *t_cp = (const unsigned char *)(cp); \
- (s) = ((uint16_t)t_cp[0] << 8) \
- | ((uint16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_GET32(l, cp) do { \
- register const unsigned char *t_cp = (const unsigned char *)(cp); \
- (l) = ((uint32_t)t_cp[0] << 24) \
- | ((uint32_t)t_cp[1] << 16) \
- | ((uint32_t)t_cp[2] << 8) \
- | ((uint32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-#define NS_PUT16(s, cp) do { \
- register uint16_t t_s = (uint16_t)(s); \
- register unsigned char *t_cp = (unsigned char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_PUT32(l, cp) do { \
- register uint32_t t_l = (uint32_t)(l); \
- register unsigned char *t_cp = (unsigned char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-} while (0)
+#define NS_GET16(s, cp) (void)((s) = ns_get16(((cp)+=2)-2))
+#define NS_GET32(l, cp) (void)((l) = ns_get32(((cp)+=4)-4))
+#define NS_PUT16(s, cp) ns_put16((s), ((cp)+=2)-2)
+#define NS_PUT32(l, cp) ns_put32((l), ((cp)+=4)-4)