summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/byteorder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/byteorder.h b/lib/util/byteorder.h
index 894beccabf..b860dea791 100644
--- a/lib/util/byteorder.h
+++ b/lib/util/byteorder.h
@@ -151,7 +151,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
#if HAVE_ASM_BYTEORDER
-#define _PTRPOS(buf,pos) (((const uint8_t *)buf)+(pos))
+#define _PTRPOS(buf,pos) (((const uint8_t *)(buf))+(pos))
#define SVAL(buf,pos) ld_le16((const uint16_t *)_PTRPOS(buf,pos))
#define IVAL(buf,pos) ld_le32((const uint32_t *)_PTRPOS(buf,pos))
#define SSVAL(buf,pos,val) st_le16((uint16_t *)_PTRPOS(buf,pos), val)