mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
replace offsetof with FIELD_OFFSET
svn path=/trunk/; revision=19130
This commit is contained in:
parent
0a977ed9f1
commit
cda9f22a27
1 changed files with 2 additions and 5 deletions
|
@ -24,9 +24,6 @@
|
||||||
#define REG_MAX_NAME_SIZE 256
|
#define REG_MAX_NAME_SIZE 256
|
||||||
#define REG_MAX_DATA_SIZE 2048
|
#define REG_MAX_DATA_SIZE 2048
|
||||||
|
|
||||||
/* FIXME: should go into msvcrt.h header? */
|
|
||||||
#define offsetof(s,m) (size_t)&(((s*)NULL)->m)
|
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
static RTL_CRITICAL_SECTION HandleTableCS;
|
static RTL_CRITICAL_SECTION HandleTableCS;
|
||||||
|
@ -2240,7 +2237,7 @@ RegEnumValueA( HKEY hKey, DWORD index, LPSTR value, LPDWORD val_count,
|
||||||
DWORD total_size;
|
DWORD total_size;
|
||||||
char buffer[256], *buf_ptr = buffer;
|
char buffer[256], *buf_ptr = buffer;
|
||||||
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)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",
|
//TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n",
|
||||||
// hkey, index, value, val_count, reserved, type, data, count );
|
// hkey, index, value, val_count, reserved, type, data, count );
|
||||||
|
@ -2367,7 +2364,7 @@ RegEnumValueW( HKEY hKey, DWORD index, LPWSTR value, PDWORD val_count,
|
||||||
DWORD total_size;
|
DWORD total_size;
|
||||||
char buffer[256], *buf_ptr = buffer;
|
char buffer[256], *buf_ptr = buffer;
|
||||||
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)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",
|
//TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n",
|
||||||
// hkey, index, value, val_count, reserved, type, data, count );
|
// hkey, index, value, val_count, reserved, type, data, count );
|
||||||
|
|
Loading…
Reference in a new issue