From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 7B3303896C31; Tue, 25 May 2021 14:56:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B3303896C31 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: POSIX msg queues: slightly rephrase get_mqinfo X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 2cc914a34e505e7ce13b18d0f517b58a996a2d1e X-Git-Newrev: a4e074672aa61bd8b8a3b9493b9bdc85683e7604 Message-Id: <20210525145625.7B3303896C31@sourceware.org> Date: Tue, 25 May 2021 14:56:25 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2021 14:56:25 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a4e074672aa61bd8b8a3b9493b9bdc85683e7604 commit a4e074672aa61bd8b8a3b9493b9bdc85683e7604 Author: Corinna Vinschen Date: Tue May 25 16:42:44 2021 +0200 Cygwin: POSIX msg queues: slightly rephrase get_mqinfo Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/posix_ipc.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index 1f913c8d7..300a3f46f 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -500,10 +500,9 @@ get_mqinfo (cygheap_fdget &fd) if (fd >= 0) { fhandler_mqueue *fh = fd->is_mqueue (); - if (!fh) - set_errno (EINVAL); - else + if (fh) return fh->mqinfo (); + set_errno (EINVAL); } return NULL; }