Throughout use wincap.allocation_granularity instead of getpagesize.
Throughout use wincap.page_size instead of getsystempagesize. Throughout use "status" as variable name to hold NTSTATUS values. * fhandler_mem.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS. Fix debug_printf output. Rectify long statements. Fix comment formatting. * fhandler_proc.cc: Ditto. (format_proc_swaps): Drop useless test for ERROR_PROC_NOT_FOUND. * fhandler_process.cc: Ditto as in fhandler_mem.cc. (get_process_state): Rearrange allocation loop. Use malloc/realloc. (get_mem_values): Fix potential NULL pointer usage. Drop unused variable. * pinfo.cc (winpids::enum_processes): Handle low memory gracefully. * sec_auth.cc (get_priv_list): Drop local variable ret. * shared.cc (memory_init): Drop outdated call to getpagesize. * syscalls.cc (getsystempagesize): Remove. * sysconf.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS. (sysinfo): Constify sizeof_stodi. Drop useless test for ERROR_PROC_NOT_FOUND. * thread.cc (pthread_getattr_np): Cast pointers to uintptr_t rather than to int for pointer arithmetic. * winsup.h (getsystempagesize): Drop declaration.
This commit is contained in:
@ -592,7 +592,6 @@ get_priv_list (LSA_HANDLE lsa, cygsid &usersid, cygsidlist &grp_list,
|
||||
PLSA_UNICODE_STRING privstrs;
|
||||
ULONG cnt;
|
||||
PTOKEN_PRIVILEGES privs = NULL;
|
||||
NTSTATUS ret;
|
||||
|
||||
if (usersid == well_known_system_sid)
|
||||
{
|
||||
@ -608,13 +607,12 @@ get_priv_list (LSA_HANDLE lsa, cygsid &usersid, cygsidlist &grp_list,
|
||||
{
|
||||
if (grp == -1)
|
||||
{
|
||||
if ((ret = LsaEnumerateAccountRights (lsa, usersid, &privstrs,
|
||||
&cnt)) != STATUS_SUCCESS)
|
||||
if (LsaEnumerateAccountRights (lsa, usersid, &privstrs, &cnt)
|
||||
!= STATUS_SUCCESS)
|
||||
continue;
|
||||
}
|
||||
else if ((ret = LsaEnumerateAccountRights (lsa, grp_list.sids[grp],
|
||||
&privstrs, &cnt))
|
||||
!= STATUS_SUCCESS)
|
||||
else if (LsaEnumerateAccountRights (lsa, grp_list.sids[grp],
|
||||
&privstrs, &cnt) != STATUS_SUCCESS)
|
||||
continue;
|
||||
for (ULONG i = 0; i < cnt; ++i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user