From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29827 invoked by alias); 28 Feb 2020 11:43:02 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 29810 invoked by uid 9078); 28 Feb 2020 11:43:01 -0000 Date: Fri, 28 Feb 2020 11:43:00 -0000 Message-ID: <20200228114301.29809.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: AF_UNIX: use Nt functions within Nt functions X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 92b8b300c26c20ea441f69b36da9a838aa85c2d8 X-Git-Newrev: f5357141ade956d8057e76b0a5e58f5069a6d399 X-SW-Source: 2020-q1/txt/msg00092.txt https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f5357141ade956d8057e76b0a5e58f5069a6d399 commit f5357141ade956d8057e76b0a5e58f5069a6d399 Author: Corinna Vinschen Date: Fri Feb 28 12:40:49 2020 +0100 Cygwin: AF_UNIX: use Nt functions within Nt functions Functionaly equivalent, but makes for cleaner code Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/fhandler_socket_unix.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index 824bcba..760f210 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -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; }