Amine Khaldi : include: Define FIELD_OFFSET to the standard offsetof.

Alexandre Julliard julliard at winehq.org
Tue Dec 11 14:41:15 CST 2012


Module: wine
Branch: master
Commit: e3dd01a264328b60bf2aa33fdab4be252315e0a5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e3dd01a264328b60bf2aa33fdab4be252315e0a5

Author: Amine Khaldi <amine.khaldi at reactos.org>
Date:   Mon Dec 10 23:14:02 2012 +0100

include: Define FIELD_OFFSET to the standard offsetof.

---

 include/winnt.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/winnt.h b/include/winnt.h
index 207adaa..5f753bc 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -746,8 +746,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
 
 #define UNICODE_STRING_MAX_CHARS 32767
 
-#define FIELD_OFFSET(type, field) \
-  ((LONG)(INT_PTR)&(((type *)0)->field))
+#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
 
 #define CONTAINING_RECORD(address, type, field) \
   ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))




More information about the wine-cvs mailing list