summaryrefslogtreecommitdiff
path: root/source4/include/byteorder.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-06-01 10:12:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:23 -0500
commit770e3307ce3da928762e15a136c562df86a9c799 (patch)
tree95930ce042b039faad683515a13e1d8413871b5d /source4/include/byteorder.h
parent98d291423ff581786a369ce373c861f94c654aa0 (diff)
downloadsamba-770e3307ce3da928762e15a136c562df86a9c799.tar.gz
samba-770e3307ce3da928762e15a136c562df86a9c799.tar.bz2
samba-770e3307ce3da928762e15a136c562df86a9c799.zip
r962: convert 'unsigned' and 'unsigned int' to uint_t
metze (This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
Diffstat (limited to 'source4/include/byteorder.h')
-rw-r--r--source4/include/byteorder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/include/byteorder.h b/source4/include/byteorder.h
index b3caa310a4..bf68ee7df7 100644
--- a/source4/include/byteorder.h
+++ b/source4/include/byteorder.h
@@ -55,7 +55,7 @@ that don't have any int types that are 2 bytes long)
You do this:
#define CVAL(buf,pos) (((uint8_t *)(buf))[pos])
-#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
+#define PVAL(buf,pos) ((uint_t)CVAL(buf,pos))
#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
then to extract a uint16_t value at offset 25 in a buffer you do this:
@@ -105,7 +105,7 @@ it also defines lots of intermediate macros, just ignore those :-)
#define CAREFUL_ALIGNMENT 1
#endif
-#define CVAL(buf,pos) ((unsigned)(((const uint8_t *)(buf))[pos]))
+#define CVAL(buf,pos) ((uint_t)(((const uint8_t *)(buf))[pos]))
#define CVAL_NC(buf,pos) (((uint8_t *)(buf))[pos]) /* Non-const version of CVAL */
#define PVAL(buf,pos) (CVAL(buf,pos))
#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))