kernel32: Remove unneeded address-of operators from array names
Andrew Talbot
andrew.talbot at talbotville.com
Fri Jul 11 04:41:30 CDT 2008
Changelog:
kernel32: Remove unneeded address-of operators from array names.
diff --git a/dlls/kernel32/instr.c b/dlls/kernel32/instr.c
index 3a9f335..5e28d95 100644
--- a/dlls/kernel32/instr.c
+++ b/dlls/kernel32/instr.c
@@ -709,7 +709,7 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context )
idt[1].LimitLow = 0x100; /* FIXME */
idt[2].LimitLow = 0x11E; /* FIXME */
idt[3].LimitLow = 0x500; /* FIXME */
- store_reg( context, instr[1], (BYTE *)&idt + offset, long_op );
+ store_reg( context, instr[1], (BYTE *)idt + offset, long_op );
context->Eip += prefixlen + len + 1;
return ExceptionContinueExecution;
}
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 1130349..5fdb307 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -3255,7 +3255,7 @@ BOOL WINAPI IsValidLanguageGroup(LGRPID lgrpid, DWORD dwFlags)
sprintfW( szValueName, szFormat, lgrpid );
- if (NLS_RegGetDword( hKey, szValueName, (LPDWORD)&szValue ))
+ if (NLS_RegGetDword( hKey, szValueName, (LPDWORD)szValue ))
{
bSupported = TRUE;
diff --git a/dlls/kernel32/relay16.c b/dlls/kernel32/relay16.c
index 3712aec..1cdfc6d 100644
--- a/dlls/kernel32/relay16.c
+++ b/dlls/kernel32/relay16.c
@@ -277,7 +277,7 @@ static const CALLFROM16 *get_entry_point( STACK16FRAME *frame, LPSTR module, LPS
/* Retrieve entry point call structure */
p = MapSL( MAKESEGPTR( frame->module_cs, frame->callfrom_ip ) );
/* p now points to lret, get the start of CALLFROM16 structure */
- return (CALLFROM16 *)(p - (BYTE *)&((CALLFROM16 *)0)->ret);
+ return (CALLFROM16 *)(p - (BYTE *)((CALLFROM16 *)0)->ret);
}
diff --git a/dlls/kernel32/task.c b/dlls/kernel32/task.c
index b2f1ae6..35e9320 100644
--- a/dlls/kernel32/task.c
+++ b/dlls/kernel32/task.c
@@ -196,7 +196,7 @@ static SEGPTR TASK_AllocThunk(void)
if (!(pTask = TASK_GetCurrent())) return 0;
sel = pTask->hCSAlias;
- pThunk = (THUNKS *)&pTask->thunks;
+ pThunk = (THUNKS *)pTask->thunks;
base = (char *)pThunk - (char *)pTask;
while (!pThunk->free)
{
@@ -231,7 +231,7 @@ static BOOL TASK_FreeThunk( SEGPTR thunk )
if (!(pTask = TASK_GetCurrent())) return 0;
sel = pTask->hCSAlias;
- pThunk = (THUNKS *)&pTask->thunks;
+ pThunk = (THUNKS *)pTask->thunks;
base = (char *)pThunk - (char *)pTask;
while (sel && (sel != HIWORD(thunk)))
{
@@ -286,7 +286,7 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, LPCSTR cmdline, BYT
/* Create the thunks block */
- TASK_CreateThunks( hTask, (char *)&pTask->thunks - (char *)pTask, 7 );
+ TASK_CreateThunks( hTask, (char *)pTask->thunks - (char *)pTask, 7 );
/* Copy the module name */
@@ -315,7 +315,7 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, LPCSTR cmdline, BYT
pTask->pdb.savedint23 = 0;
pTask->pdb.savedint24 = 0;
pTask->pdb.fileHandlesPtr =
- MAKESEGPTR( GlobalHandleToSel16(pTask->hPDB), (int)&((PDB16 *)0)->fileHandles );
+ MAKESEGPTR( GlobalHandleToSel16(pTask->hPDB), (int)((PDB16 *)0)->fileHandles );
pTask->pdb.hFileHandles = 0;
memset( pTask->pdb.fileHandles, 0xff, sizeof(pTask->pdb.fileHandles) );
/* FIXME: should we make a copy of the environment? */
@@ -348,7 +348,7 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, LPCSTR cmdline, BYT
/* Default DTA overwrites command line */
- pTask->dta = MAKESEGPTR( pTask->hPDB, (int)&pTask->pdb.cmdLine - (int)&pTask->pdb );
+ pTask->dta = MAKESEGPTR( pTask->hPDB, (int)pTask->pdb.cmdLine - (int)&pTask->pdb );
/* Create scheduler event for 16-bit tasks */
More information about the wine-patches
mailing list