From a4e074672aa61bd8b8a3b9493b9bdc85683e7604 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 25 May 2021 16:42:44 +0200 Subject: [PATCH] Cygwin: POSIX msg queues: slightly rephrase get_mqinfo Signed-off-by: Corinna Vinschen --- 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; }