From 58accdd0835f9544a4e1ad0f88ef8d5ea815dd83 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 21 May 2004 20:11:48 +0000 Subject: 2004-05-21 Joel Sherrill PR 629/rtems * cpukit/src/mqueuecreatesupp.c: Return EINVAL is mq_maxmsg is <= 0, not <. --- cpukit/ChangeLog | 6 ++++++ cpukit/posix/src/mqueuecreatesupp.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 6318531726..4e10662095 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2004-05-21 Joel Sherrill + + PR 629/rtems + * cpukit/src/mqueuecreatesupp.c: Return EINVAL is mq_maxmsg is + <= 0, not <. + 2004-05-21 Till Strauman PR 626/networking diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c index 13097446c7..1259701124 100644 --- a/cpukit/posix/src/mqueuecreatesupp.c +++ b/cpukit/posix/src/mqueuecreatesupp.c @@ -76,12 +76,12 @@ int _POSIX_Message_queue_Create_support( attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { - if ( attr_ptr->mq_maxmsg < 0 ){ + if ( attr_ptr->mq_maxmsg <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } - if ( attr_ptr->mq_msgsize < 0 ){ + if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } -- cgit v1.2.3