Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
88459911
Commit
88459911
authored
Sep 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SIZE_T instead of ULONG for the size arguments of the virtual
memory functions.
parent
f8ee161a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
16 deletions
+15
-16
env.c
dlls/ntdll/env.c
+5
-5
handletable.c
dlls/ntdll/handletable.c
+3
-4
loader.c
dlls/ntdll/loader.c
+2
-2
server.c
dlls/ntdll/server.c
+1
-1
thread.c
dlls/ntdll/thread.c
+4
-4
No files found.
dlls/ntdll/env.c
View file @
88459911
...
...
@@ -62,7 +62,7 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env)
}
else
{
ULONG
size
=
1
;
SIZE_T
size
=
1
;
PVOID
addr
=
NULL
;
nts
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
0
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
);
...
...
@@ -77,7 +77,7 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env)
*/
NTSTATUS
WINAPI
RtlDestroyEnvironment
(
PWSTR
env
)
{
ULONG
size
=
0
;
SIZE_T
size
=
0
;
TRACE
(
"(%p)!
\n
"
,
env
);
...
...
@@ -220,7 +220,7 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name,
if
((
old_size
+
len
)
*
sizeof
(
WCHAR
)
>
mbi
.
RegionSize
)
{
LPWSTR
new_env
;
ULONG
new_size
=
(
old_size
+
len
)
*
sizeof
(
WCHAR
);
SIZE_T
new_size
=
(
old_size
+
len
)
*
sizeof
(
WCHAR
);
new_env
=
NULL
;
nts
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
(
void
**
)
&
new_env
,
0
,
...
...
@@ -422,7 +422,7 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
static
const
UNICODE_STRING
null_str
=
{
0
,
0
,
NULL
};
const
RTL_USER_PROCESS_PARAMETERS
*
cur_params
;
ULONG
size
,
total_size
;
SIZE_T
size
,
total_size
;
void
*
ptr
;
NTSTATUS
status
;
...
...
@@ -482,6 +482,6 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
void
WINAPI
RtlDestroyProcessParameters
(
RTL_USER_PROCESS_PARAMETERS
*
params
)
{
void
*
ptr
=
params
;
ULONG
size
=
0
;
SIZE_T
size
=
0
;
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
ptr
,
&
size
,
MEM_RELEASE
);
}
dlls/ntdll/handletable.c
View file @
88459911
...
...
@@ -74,7 +74,7 @@ void WINAPI RtlInitializeHandleTable(ULONG MaxHandleCount, ULONG HandleSize, RTL
*/
NTSTATUS
WINAPI
RtlDestroyHandleTable
(
RTL_HANDLE_TABLE
*
HandleTable
)
{
ULONG
Size
=
0
;
SIZE_T
Size
=
0
;
TRACE
(
"(%p)
\n
"
,
HandleTable
);
...
...
@@ -104,7 +104,7 @@ static NTSTATUS RtlpAllocateSomeHandles(RTL_HANDLE_TABLE * HandleTable)
if
(
!
HandleTable
->
FirstHandle
)
{
PVOID
FirstHandleAddr
=
NULL
;
ULONG
MaxSize
=
HandleTable
->
MaxHandleCount
*
HandleTable
->
HandleSize
;
SIZE_T
MaxSize
=
HandleTable
->
MaxHandleCount
*
HandleTable
->
HandleSize
;
/* reserve memory for the handles, but don't commit it yet because we
* probably won't use most of it and it will use up physical memory */
...
...
@@ -123,8 +123,7 @@ static NTSTATUS RtlpAllocateSomeHandles(RTL_HANDLE_TABLE * HandleTable)
}
if
(
!
HandleTable
->
NextFree
)
{
ULONG
CommitSize
=
4096
;
/* one page */
ULONG
Offset
;
SIZE_T
Offset
,
CommitSize
=
4096
;
/* one page */
RTL_HANDLE
*
FreeHandle
=
NULL
;
PVOID
NextAvailAddr
=
HandleTable
->
ReservedMemory
;
...
...
dlls/ntdll/loader.c
View file @
88459911
...
...
@@ -455,7 +455,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
const
char
*
name
=
get_rva
(
module
,
descr
->
Name
);
DWORD
len
=
strlen
(
name
)
+
1
;
PVOID
protect_base
;
DWORD
protect_size
=
0
;
SIZE_T
protect_size
=
0
;
DWORD
protect_old
;
thunk_list
=
get_rva
(
module
,
(
DWORD
)
descr
->
FirstThunk
);
...
...
@@ -1287,7 +1287,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
OBJECT_ATTRIBUTES
attr
;
LARGE_INTEGER
size
;
IMAGE_NT_HEADERS
*
nt
;
DWORD
len
=
0
;
SIZE_T
len
=
0
;
WINE_MODREF
*
wm
;
NTSTATUS
status
;
...
...
dlls/ntdll/server.c
View file @
88459911
...
...
@@ -126,7 +126,7 @@ static void fatal_perror( const char *err, ... )
void
server_exit_thread
(
int
status
)
{
struct
wine_pthread_thread_info
info
;
ULONG
size
;
SIZE_T
size
;
RtlAcquirePebLock
();
RemoveEntryList
(
&
NtCurrentTeb
()
->
TlsLinks
);
...
...
dlls/ntdll/thread.c
View file @
88459911
...
...
@@ -84,7 +84,7 @@ static inline NTSTATUS init_teb( TEB *teb )
*/
static
inline
void
free_teb
(
TEB
*
teb
)
{
ULONG
size
=
0
;
SIZE_T
size
=
0
;
void
*
addr
=
teb
;
struct
ntdll_thread_data
*
thread_data
=
(
struct
ntdll_thread_data
*
)
teb
->
SystemReserved2
;
...
...
@@ -105,7 +105,7 @@ void thread_init(void)
{
TEB
*
teb
;
void
*
addr
;
ULONG
info_size
;
SIZE_T
info_size
;
struct
ntdll_thread_data
*
thread_data
;
struct
wine_pthread_thread_info
thread_info
;
static
struct
debug_info
debug_info
;
/* debug info for initial thread */
...
...
@@ -193,7 +193,7 @@ static void start_thread( struct wine_pthread_thread_info *info )
PRTL_THREAD_START_ROUTINE
func
=
startup_info
->
entry_point
;
void
*
arg
=
startup_info
->
entry_arg
;
struct
debug_info
debug_info
;
ULONG
size
;
SIZE_T
size
;
debug_info
.
str_pos
=
debug_info
.
strings
;
debug_info
.
out_pos
=
debug_info
.
output
;
...
...
@@ -323,7 +323,7 @@ error:
if
(
thread_data
)
wine_ldt_free_fs
(
thread_data
->
teb_sel
);
if
(
addr
)
{
ULONG
size
=
0
;
SIZE_T
size
=
0
;
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
}
if
(
info
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
info
);
...
...
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