s3:includes: simplify INO_T_VAL macros
authorStefan Metzmacher <metze@samba.org>
Sat, 23 Apr 2011 09:15:30 +0000 (11:15 +0200)
committerStefan Metzmacher <metze@samba.org>
Sun, 24 Apr 2011 07:48:50 +0000 (09:48 +0200)
metze

source3/include/includes.h

index e524b2afff92452478f293f5c324856a9bbe07a5..8f220dfaec5fbbad14b435c191825868a863432b 100644 (file)
@@ -308,10 +308,10 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #endif
 
 #ifdef LARGE_SMB_INO_T
-#define SINO_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32))
-#define INO_T_VAL(p, ofs) ((SMB_INO_T)(((uint64_t)(IVAL(p,ofs)))| (((uint64_t)(IVAL(p,(ofs)+4))) << 32)))
+#define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, v)
+#define INO_T_VAL(p, ofs) ((SMB_INO_T)BVAL(p, ofs))
 #else 
-#define SINO_T_VAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
+#define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, ((uint64_t)(v)) & UINT32_MAX)
 #define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs))))
 #endif