CVAL_NC() doesn't need the (unsigned) fix and breaks the IRIX build
authorAndrew Tridgell <tridge@samba.org>
Thu, 31 Jul 2003 23:22:21 +0000 (23:22 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 31 Jul 2003 23:22:21 +0000 (23:22 +0000)
Thanks to Herb for pointing this out!

source/include/byteorder.h

index 63696fa85800df0981317d8082103ac53ecd231b..0eef55730662e97ccb831de6bb37bad00caeee61 100644 (file)
@@ -106,7 +106,7 @@ it also defines lots of intermediate macros, just ignore those :-)
 #endif
 
 #define CVAL(buf,pos) ((unsigned)(((const unsigned char *)(buf))[pos]))
-#define CVAL_NC(buf,pos) ((unsigned)(((unsigned char *)(buf))[pos])) /* Non-const version of CVAL */
+#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))