This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit ef0c6b30c4831a9f672744e222310e89aa8b0cc8 Author: ligd <[email protected]> AuthorDate: Sun Jan 3 20:13:39 2021 +0800 apps: update mqueue_open usage As the mqd_t change to int Change-Id: I16a9c137b6308eeec0badd241a101359e5f751b4 Signed-off-by: ligd <[email protected]> --- testing/ostest/mqueue.c | 4 ++-- testing/ostest/timedmqueue.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/ostest/mqueue.c b/testing/ostest/mqueue.c index df37df5..8b3fdc8 100644 --- a/testing/ostest/mqueue.c +++ b/testing/ostest/mqueue.c @@ -180,7 +180,7 @@ static void *receiver_thread(void *arg) */ g_recv_mqfd = mq_open("mqueue", O_RDONLY | O_CREAT, 0666, &attr); - if (g_recv_mqfd < 0) + if (g_recv_mqfd == (mqd_t)-1) { printf("receiver_thread: ERROR mq_open failed\n"); pthread_exit((pthread_addr_t)1); @@ -259,7 +259,7 @@ static void *receiver_thread(void *arg) } else { - g_recv_mqfd = NULL; + g_recv_mqfd = 0; } printf("receiver_thread: returning nerrors=%d\n", nerrors); diff --git a/testing/ostest/timedmqueue.c b/testing/ostest/timedmqueue.c index 40e8bb1..1f3abd8 100644 --- a/testing/ostest/timedmqueue.c +++ b/testing/ostest/timedmqueue.c @@ -188,7 +188,7 @@ static void *sender_thread(void *arg) } else { - g_send_mqfd = NULL; + g_send_mqfd = 0; } printf("sender_thread: returning nerrors=%d\n", nerrors); @@ -314,7 +314,7 @@ static void *receiver_thread(void *arg) } else { - g_recv_mqfd = NULL; + g_recv_mqfd = 0; } printf("receiver_thread: returning nerrors=%d\n", nerrors);
