public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304)
@ 2022-06-30 12:13 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-06-30 12:13 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=71d87d85bf54f6522813aec97c19bdd24997341e

commit 71d87d85bf54f6522813aec97c19bdd24997341e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jun 30 09:08:31 2022 -0300

    linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304)
    
    On  success,  mq_receive() and mq_timedreceive() return the number of
    bytes in the received message, so it requires to check if the value
    is larger than 0.
    
    Checked on i686-linux-gnu.

Diff:
---
 sysdeps/unix/sysv/linux/mq_timedreceive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c
index 834cd7a484..5bf1e0a83b 100644
--- a/sysdeps/unix/sysv/linux/mq_timedreceive.c
+++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c
@@ -41,7 +41,7 @@ ___mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len
     {
       int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
 			      msg_prio, abs_timeout);
-      if (r == 0 || errno != ENOSYS)
+      if (r >= 0 || errno != ENOSYS)
 	return r;
       __set_errno (EOVERFLOW);
       return -1;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-30 12:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:13 [glibc] linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304) Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).