mq_open will return -1 when ERROR.

Signed-off-by: Wanlong Gao <[email protected]>
---
 .../stress/mqueues/multi_send_rev_1.c              |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c 
b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
index ea4c544..d80d386 100644
--- a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
+++ b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
        mqstat.mq_flags = 0;
 
        for (i = 0; i < num; i++) {
-               if ((mq[i] = mq_open(MQ_NAME[i],oflag,0777, &mqstat)) != -1) {
+               if ((mq[i] = mq_open(MQ_NAME[i],oflag,0777, &mqstat)) == -1) {
                        perror("mq_open doesn't return success \n");
                        return PTS_UNRESOLVED;
                }
@@ -126,4 +126,4 @@ int main(int argc, char *argv[])
                mq_unlink(MQ_NAME[i]);
        }
        return PTS_PASS;
-}
\ No newline at end of file
+}
-- 
1.7.6


------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to