diff options
author | midipix <writeonce@midipix.org> | 2022-11-12 23:11:36 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2022-11-13 00:04:13 +0000 |
commit | 3b05e82a2c5d529cb383a5c06b509883dc59d628 (patch) | |
tree | d86718a78a99a592ae1abb269b4028785e2376a9 /src/system | |
parent | 065693d86b3cda3ebfd59b5fbf240d67fe743f9d (diff) | |
download | ntapi-3b05e82a2c5d529cb383a5c06b509883dc59d628.tar.bz2 ntapi-3b05e82a2c5d529cb383a5c06b509883dc59d628.tar.xz |
__ntapi_tt_get_system_info_snapshot(): eliminate the buffer's helper struct.
Diffstat (limited to 'src/system')
-rw-r--r-- | src/system/ntapi_tt_get_system_info_snapshot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/system/ntapi_tt_get_system_info_snapshot.c b/src/system/ntapi_tt_get_system_info_snapshot.c index fd51f46..1f55752 100644 --- a/src/system/ntapi_tt_get_system_info_snapshot.c +++ b/src/system/ntapi_tt_get_system_info_snapshot.c @@ -30,7 +30,7 @@ int32_t __stdcall __ntapi_tt_get_system_info_snapshot( /* allocate initial buffer */ status = __ntapi->zw_allocate_virtual_memory( NT_CURRENT_PROCESS_HANDLE, - (void **)&sys_info_snapshot->buffer, + &sys_info_snapshot->buffer, 0, &sys_info_snapshot->max_len, NT_MEM_COMMIT, @@ -51,7 +51,7 @@ int32_t __stdcall __ntapi_tt_get_system_info_snapshot( /* free previously allocated memory */ status = __ntapi->zw_free_virtual_memory( NT_CURRENT_PROCESS_HANDLE, - (void **)&sys_info_snapshot->buffer, + &sys_info_snapshot->buffer, &sys_info_snapshot->max_len, NT_MEM_RELEASE); @@ -60,13 +60,13 @@ int32_t __stdcall __ntapi_tt_get_system_info_snapshot( return status; /* reset buffer and increase buffer size */ - sys_info_snapshot->buffer = (nt_system_information_buffer *)0; + sys_info_snapshot->buffer = 0; sys_info_snapshot->max_len += NT_ALLOCATION_GRANULARITY; /* reallocate buffer memory */ status = __ntapi->zw_allocate_virtual_memory( NT_CURRENT_PROCESS_HANDLE, - (void **)&sys_info_snapshot->buffer, + &sys_info_snapshot->buffer, 0, &sys_info_snapshot->max_len, NT_MEM_COMMIT, @@ -80,7 +80,7 @@ int32_t __stdcall __ntapi_tt_get_system_info_snapshot( /* verification */ if (status == NT_STATUS_SUCCESS) { - sys_info_snapshot->pcurrent = &sys_info_snapshot->buffer->mark; + sys_info_snapshot->pcurrent = sys_info_snapshot->buffer; return NT_STATUS_SUCCESS; } else { sys_info_snapshot->pcurrent = (void *)0; |