Cygwin: AF_UNIX: use Nt functions within Nt functions

Functionaly equivalent, but makes for cleaner code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2020-02-28 12:40:49 +01:00
parent 92b8b300c2
commit f5357141ad
1 changed files with 3 additions and 3 deletions

View File

@ -1436,10 +1436,10 @@ fhandler_socket_unix::socketpair (int af, int type, int protocol, int flags,
fh_open_pipe_failed:
NtClose (pipe);
create_pipe_failed:
NtUnmapViewOfSection (GetCurrentProcess (), fh->shmem);
NtUnmapViewOfSection (NtCurrentProcess (), fh->shmem);
NtClose (fh->shmem_handle);
fh_shmem_failed:
NtUnmapViewOfSection (GetCurrentProcess (), shmem);
NtUnmapViewOfSection (NtCurrentProcess (), shmem);
NtClose (shmem_handle);
return -1;
}
@ -1814,7 +1814,7 @@ fhandler_socket_unix::close ()
NtClose (shm);
param = InterlockedExchangePointer ((PVOID *) &shmem, NULL);
if (param)
NtUnmapViewOfSection (GetCurrentProcess (), param);
NtUnmapViewOfSection (NtCurrentProcess (), param);
return 0;
}