diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-30 09:08:31 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-30 10:46:55 -0300 |
commit | 6f8c9dc8bbaf54edf64da3177d82ca5db00cafd3 (patch) | |
tree | b8284dad48494cb3acbb1e287f48e9f50a59b760 | |
parent | 443e146ce7aa1df0aa29fc0775451a4d933fcfbb (diff) | |
download | glibc-6f8c9dc8bbaf54edf64da3177d82ca5db00cafd3.tar.gz |
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.
(cherry picked from commit 71d87d85bf54f6522813aec97c19bdd24997341e)
-rw-r--r-- | sysdeps/unix/sysv/linux/mq_timedreceive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c index 728a63d1ec..fda57be19d 100644 --- a/sysdeps/unix/sysv/linux/mq_timedreceive.c +++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c @@ -35,7 +35,7 @@ __mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len, #else int ret = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout); - if (ret == 0 || errno != ENOSYS) + if (ret >= 0 || errno != ENOSYS) return ret; struct timespec ts32; |