summaryrefslogtreecommitdiff
path: root/source3/include/byteorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/byteorder.h')
-rw-r--r--source3/include/byteorder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h
index c262dd2d33..0eef557306 100644
--- a/source3/include/byteorder.h
+++ b/source3/include/byteorder.h
@@ -105,7 +105,7 @@ it also defines lots of intermediate macros, just ignore those :-)
#define CAREFUL_ALIGNMENT 1
#endif
-#define CVAL(buf,pos) (((const unsigned char *)(buf))[pos])
+#define CVAL(buf,pos) ((unsigned)(((const unsigned char *)(buf))[pos]))
#define CVAL_NC(buf,pos) (((unsigned char *)(buf))[pos]) /* Non-const version of CVAL */
#define PVAL(buf,pos) (CVAL(buf,pos))
#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))