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


The following commit(s) were added to refs/heads/master by this push:
     new 0e4c29b  system/nx: update mqueue_open return value
0e4c29b is described below

commit 0e4c29be03de304e1a973a634943d6cebb1c6929
Author: ligd <[email protected]>
AuthorDate: Sun Jan 3 22:14:49 2021 +0800

    system/nx: update mqueue_open return value
    
    Change-Id: Ic8d7763fa2da01312cb0e02b4aaf73893cad471a
    Signed-off-by: ligd <[email protected]>
---
 system/nxlooper/nxlooper.c     | 4 ++--
 system/nxplayer/nxplayer.c     | 4 ++--
 system/nxrecorder/nxrecorder.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/system/nxlooper/nxlooper.c b/system/nxlooper/nxlooper.c
index 57e7ac4..ac0d0b2 100644
--- a/system/nxlooper/nxlooper.c
+++ b/system/nxlooper/nxlooper.c
@@ -1051,7 +1051,7 @@ int nxlooper_loopraw(FAR struct nxlooper_s *plooper,
            (unsigned long)((uintptr_t)plooper));
 
   plooper->mq = mq_open(plooper->mqname, O_RDWR | O_CREAT, 0644, &attr);
-  if (plooper->mq == NULL)
+  if (plooper->mq == (mqd_t) -1)
     {
       /* Unable to open message queue! */
 
@@ -1166,7 +1166,7 @@ FAR struct nxlooper_s *nxlooper_create(void)
   plooper->playdev[0] = '\0';
   plooper->recorddev[0] = '\0';
 #endif
-  plooper->mq = NULL;
+  plooper->mq = 0;
   plooper->loop_id = 0;
   plooper->crefs = 1;
 
diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c
index d362624..bdddded 100644
--- a/system/nxplayer/nxplayer.c
+++ b/system/nxplayer/nxplayer.c
@@ -1954,7 +1954,7 @@ static int nxplayer_playinternal(FAR struct nxplayer_s 
*pplayer,
            (unsigned long)((uintptr_t)pplayer));
 
   pplayer->mq = mq_open(pplayer->mqname, O_RDWR | O_CREAT, 0644, &attr);
-  if (pplayer->mq == NULL)
+  if (pplayer->mq == (mqd_t) -1)
     {
       /* Unable to open message queue! */
 
@@ -2148,7 +2148,7 @@ FAR struct nxplayer_s *nxplayer_create(void)
   pplayer->prefformat = 0;
   pplayer->preftype = 0;
 #endif
-  pplayer->mq = NULL;
+  pplayer->mq = 0;
   pplayer->play_id = 0;
   pplayer->crefs = 1;
 
diff --git a/system/nxrecorder/nxrecorder.c b/system/nxrecorder/nxrecorder.c
index e60762f..d34b722 100644
--- a/system/nxrecorder/nxrecorder.c
+++ b/system/nxrecorder/nxrecorder.c
@@ -866,7 +866,7 @@ int nxrecorder_recordraw(FAR struct nxrecorder_s *precorder,
            (unsigned long)((uintptr_t)precorder));
 
   precorder->mq = mq_open(precorder->mqname, O_RDWR | O_CREAT, 0644, &attr);
-  if (precorder->mq == NULL)
+  if (precorder->mq == (mqd_t) -1)
     {
       /* Unable to open message queue! */
 
@@ -968,7 +968,7 @@ FAR struct nxrecorder_s *nxrecorder_create(void)
   precorder->dev_fd = -1;
   precorder->fd = -1;
   precorder->device[0] = '\0';
-  precorder->mq = NULL;
+  precorder->mq = 0;
   precorder->record_id = 0;
   precorder->crefs = 1;
 

Reply via email to