Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d26b0296
Commit
d26b0296
authored
Nov 28, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove some superfluous casts of void pointers.
parent
dd562594
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
20 deletions
+19
-20
heap.c
dlls/kernel32/heap.c
+1
-1
ne_module.c
dlls/kernel32/ne_module.c
+6
-6
ne_segment.c
dlls/kernel32/ne_segment.c
+1
-1
resource16.c
dlls/kernel32/resource16.c
+1
-1
snoop16.c
dlls/kernel32/snoop16.c
+1
-1
task.c
dlls/kernel32/task.c
+6
-6
loader.c
dlls/kernel32/tests/loader.c
+3
-4
No files found.
dlls/kernel32/heap.c
View file @
d26b0296
...
...
@@ -1142,7 +1142,7 @@ void WINAPI __regs_AllocMappedBuffer(
CONTEXT86
*
context
/* [in] EDI register: size of buffer to allocate */
)
{
HGLOBAL
handle
=
GlobalAlloc
(
0
,
context
->
Edi
+
8
);
DWORD
*
buffer
=
(
DWORD
*
)
GlobalLock
(
handle
);
DWORD
*
buffer
=
GlobalLock
(
handle
);
DWORD
ptr
=
0
;
if
(
buffer
)
...
...
dlls/kernel32/ne_module.c
View file @
d26b0296
...
...
@@ -706,7 +706,7 @@ static HMODULE16 build_module( const void *mapping, SIZE_T mapping_size, LPCSTR
if
(
!
hModule
)
return
ERROR_BAD_FORMAT
;
FarSetOwner16
(
hModule
,
hModule
);
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
hModule
);
pModule
=
GlobalLock16
(
hModule
);
memcpy
(
pModule
,
ne_header
,
sizeof
(
*
ne_header
)
);
pModule
->
count
=
0
;
/* check programs for default minimal stack size */
...
...
@@ -846,7 +846,7 @@ static BOOL NE_LoadDLLs( NE_MODULE *pModule )
{
int
i
;
WORD
*
pModRef
=
(
WORD
*
)((
char
*
)
pModule
+
pModule
->
ne_modtab
);
WORD
*
pDLLs
=
(
WORD
*
)
GlobalLock16
(
pModule
->
dlls_to_init
);
WORD
*
pDLLs
=
GlobalLock16
(
pModule
->
dlls_to_init
);
for
(
i
=
0
;
i
<
pModule
->
ne_cmod
;
i
++
,
pModRef
++
)
{
...
...
@@ -2014,7 +2014,7 @@ static HMODULE16 create_dummy_module( HMODULE module32 )
if
(
!
hModule
)
return
ERROR_BAD_FORMAT
;
FarSetOwner16
(
hModule
,
hModule
);
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
hModule
);
pModule
=
GlobalLock16
(
hModule
);
/* Set all used entries */
pModule
->
ne_magic
=
IMAGE_OS2_SIGNATURE
;
...
...
@@ -2120,11 +2120,11 @@ HMODULE16 WINAPI MapHModuleLS(HMODULE hmod)
return
TASK_GetCurrent
()
->
hInstance
;
if
(
!
HIWORD
(
hmod
))
return
LOWORD
(
hmod
);
/* we already have a 16 bit module handle */
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
hFirstModule
);
pModule
=
GlobalLock16
(
hFirstModule
);
while
(
pModule
)
{
if
(
pModule
->
module32
==
hmod
)
return
pModule
->
self
;
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
pModule
->
next
);
pModule
=
GlobalLock16
(
pModule
->
next
);
}
if
((
ret
=
create_dummy_module
(
hmod
))
<
32
)
{
...
...
@@ -2145,7 +2145,7 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod)
TDB
*
pTask
=
TASK_GetCurrent
();
hmod
=
pTask
->
hModule
;
}
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
hmod
);
pModule
=
GlobalLock16
(
hmod
);
if
((
pModule
->
ne_magic
!=
IMAGE_OS2_SIGNATURE
)
||
!
(
pModule
->
ne_flags
&
NE_FFLAGS_WIN32
))
return
0
;
return
pModule
->
module32
;
...
...
dlls/kernel32/ne_segment.c
View file @
d26b0296
...
...
@@ -724,7 +724,7 @@ void NE_InitializeDLLs( HMODULE16 hModule )
{
HGLOBAL16
to_init
=
pModule
->
dlls_to_init
;
pModule
->
dlls_to_init
=
0
;
for
(
pDLL
=
(
HMODULE16
*
)
GlobalLock16
(
to_init
);
*
pDLL
;
pDLL
++
)
for
(
pDLL
=
GlobalLock16
(
to_init
);
*
pDLL
;
pDLL
++
)
{
NE_InitializeDLLs
(
*
pDLL
);
}
...
...
dlls/kernel32/resource16.c
View file @
d26b0296
...
...
@@ -203,7 +203,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
pTypeInfo
->
type_id
,
pNameInfo
->
id
);
handle
=
LoadResource16
(
pModule
->
self
,
(
HRSRC16
)((
char
*
)
pNameInfo
-
(
char
*
)
pModule
)
);
for
(
p
=
(
WORD
*
)
LockResource16
(
handle
);
p
&&
*
p
;
p
=
(
WORD
*
)((
char
*
)
p
+*
p
))
for
(
p
=
LockResource16
(
handle
);
p
&&
*
p
;
p
=
(
WORD
*
)((
char
*
)
p
+*
p
))
{
TRACE
(
" type=%04x '%s' id=%04x '%s'
\n
"
,
p
[
1
],
(
char
*
)(
p
+
3
),
p
[
2
],
...
...
dlls/kernel32/snoop16.c
View file @
d26b0296
...
...
@@ -203,7 +203,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
/* Now search the non-resident names table */
if
(
!*
cpnt
&&
pModule
->
nrname_handle
)
{
cpnt
=
(
unsigned
char
*
)
GlobalLock16
(
pModule
->
nrname_handle
);
cpnt
=
GlobalLock16
(
pModule
->
nrname_handle
);
while
(
*
cpnt
)
{
cpnt
+=
*
cpnt
+
1
+
sizeof
(
WORD
);
if
(
*
(
WORD
*
)(
cpnt
+*
cpnt
+
1
)
==
ordinal
)
{
...
...
dlls/kernel32/task.c
View file @
d26b0296
...
...
@@ -209,7 +209,7 @@ static SEGPTR TASK_AllocThunk(void)
TASK_CreateThunks
(
sel
,
0
,
MIN_THUNKS
);
pThunk
->
next
=
sel
;
}
pThunk
=
(
THUNKS
*
)
GlobalLock16
(
sel
);
pThunk
=
GlobalLock16
(
sel
);
base
=
0
;
}
base
+=
pThunk
->
free
;
...
...
@@ -236,7 +236,7 @@ static BOOL TASK_FreeThunk( SEGPTR thunk )
while
(
sel
&&
(
sel
!=
HIWORD
(
thunk
)))
{
sel
=
pThunk
->
next
;
pThunk
=
(
THUNKS
*
)
GlobalLock16
(
sel
);
pThunk
=
GlobalLock16
(
sel
);
base
=
0
;
}
if
(
!
sel
)
return
FALSE
;
...
...
@@ -937,7 +937,7 @@ static BOOL TASK_GetCodeSegment( FARPROC16 proc, NE_MODULE **ppModule,
int
segNr
=
0
;
/* Try pair of module handle / segment number */
pModule
=
(
NE_MODULE
*
)
GlobalLock16
(
HIWORD
(
proc
)
);
pModule
=
GlobalLock16
(
HIWORD
(
proc
)
);
if
(
pModule
&&
pModule
->
ne_magic
==
IMAGE_OS2_SIGNATURE
)
{
segNr
=
LOWORD
(
proc
);
...
...
@@ -1100,7 +1100,7 @@ void WINAPI SwitchStackTo16( WORD seg, WORD ptr, WORD top )
INSTANCEDATA
*
pData
;
UINT16
copySize
;
if
(
!
(
pData
=
(
INSTANCEDATA
*
)
GlobalLock16
(
seg
)))
return
;
if
(
!
(
pData
=
GlobalLock16
(
seg
)))
return
;
TRACE
(
"old=%04x:%04x new=%04x:%04x
\n
"
,
SELECTOROF
(
NtCurrentTeb
()
->
WOW32Reserved
),
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
),
seg
,
ptr
);
...
...
@@ -1142,7 +1142,7 @@ void WINAPI SwitchStackBack16( CONTEXT86 *context )
STACK16FRAME
*
oldFrame
,
*
newFrame
;
INSTANCEDATA
*
pData
;
if
(
!
(
pData
=
(
INSTANCEDATA
*
)
GlobalLock16
(
SELECTOROF
(
NtCurrentTeb
()
->
WOW32Reserved
))))
if
(
!
(
pData
=
GlobalLock16
(
SELECTOROF
(
NtCurrentTeb
()
->
WOW32Reserved
))))
return
;
if
(
!
pData
->
old_ss_sp
)
{
...
...
@@ -1243,7 +1243,7 @@ DWORD WINAPI GetCurPID16( DWORD unused )
*/
INT16
WINAPI
GetInstanceData16
(
HINSTANCE16
instance
,
WORD
buffer
,
INT16
len
)
{
char
*
ptr
=
(
char
*
)
GlobalLock16
(
instance
);
char
*
ptr
=
GlobalLock16
(
instance
);
if
(
!
ptr
||
!
len
)
return
0
;
if
((
int
)
buffer
+
len
>=
0x10000
)
len
=
0x10000
-
buffer
;
memcpy
(
(
char
*
)
GlobalLock16
(
CURRENT_DS
)
+
buffer
,
ptr
+
buffer
,
len
);
...
...
dlls/kernel32/tests/loader.c
View file @
d26b0296
...
...
@@ -523,11 +523,10 @@ static void test_ImportDescriptors(void)
* */
for
(;
import_chunk
->
FirstThunk
;
import_chunk
++
)
{
LPCSTR
module_name
=
(
LPCSTR
)
RVAToAddr
(
import_chunk
->
Name
,
kernel32_module
);
PIMAGE_THUNK_DATA
name_table
=
(
PIMAGE_THUNK_DATA
)
RVAToAddr
(
LPCSTR
module_name
=
RVAToAddr
(
import_chunk
->
Name
,
kernel32_module
);
PIMAGE_THUNK_DATA
name_table
=
RVAToAddr
(
U
(
*
import_chunk
).
OriginalFirstThunk
,
kernel32_module
);
PIMAGE_THUNK_DATA
iat
=
(
PIMAGE_THUNK_DATA
)
RVAToAddr
(
PIMAGE_THUNK_DATA
iat
=
RVAToAddr
(
import_chunk
->
FirstThunk
,
kernel32_module
);
ok
(
module_name
!=
NULL
,
"Imported module name should not be NULL
\n
"
);
ok
(
name_table
!=
NULL
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment