replace offsetof with FIELD_OFFSET
Modified: trunk/reactos/lib/advapi32/reg/reg.c
_____
Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c 2005-11-11 08:58:05 UTC
(rev 19129)
+++ trunk/reactos/lib/advapi32/reg/reg.c 2005-11-11 11:59:56 UTC
(rev 19130)
@@ -24,9 +24,6 @@
#define REG_MAX_NAME_SIZE 256
#define REG_MAX_DATA_SIZE 2048
-/* FIXME: should go into msvcrt.h header? */
-#define offsetof(s,m) (size_t)&(((s*)NULL)->m)
-
/* GLOBALS
******************************************************************/
static RTL_CRITICAL_SECTION HandleTableCS;
@@ -2240,7 +2237,7 @@
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION
*)buffer;
- static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION,
Name );
+ static const int info_size = FIELD_OFFSET(
KEY_VALUE_FULL_INFORMATION, Name );
//TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n",
// hkey, index, value, val_count, reserved, type, data, count
);
@@ -2367,7 +2364,7 @@
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION
*)buffer;
- static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION,
Name );
+ static const int info_size = FIELD_OFFSET(
KEY_VALUE_FULL_INFORMATION, Name );
//TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n",
// hkey, index, value, val_count, reserved, type, data, count
);