Cygwin: POSIX mq: only allo priority up to MQ_PRIO_MAX - 1
POSIX requires that message priorities range from 0 (low) to sysconf(_SC_MQ_PRIO_MAX) - 1 (high). Cygwin's mq_send erroneously allowed a message priority of sysconf(_SC_MQ_PRIO_MAX). Fix it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
c66797eef8
commit
4f89f24fbe
|
@ -798,7 +798,7 @@ _mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
|
||||||
set_errno (EBADF);
|
set_errno (EBADF);
|
||||||
__leave;
|
__leave;
|
||||||
}
|
}
|
||||||
if (prio > MQ_PRIO_MAX)
|
if (prio >= MQ_PRIO_MAX)
|
||||||
{
|
{
|
||||||
set_errno (EINVAL);
|
set_errno (EINVAL);
|
||||||
__leave;
|
__leave;
|
||||||
|
|
Loading…
Reference in New Issue