include: Define CONTAINING_RECORD using the standard offsetof.
This commit is contained in:
parent
e3dd01a264
commit
649c982e60
|
@ -749,7 +749,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
|||
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
|
||||
|
||||
#define CONTAINING_RECORD(address, type, field) \
|
||||
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
|
||||
((type *)((PCHAR)(address) - offsetof(type, field)))
|
||||
|
||||
/* Types */
|
||||
|
||||
|
|
Loading…
Reference in New Issue