You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/15 05:00:43 UTC

[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #2848: graphics: nxmu: Fix hard fault in nxmu_server.c

masayuki2009 commented on a change in pull request #2848:
URL: https://github.com/apache/incubator-nuttx/pull/2848#discussion_r575943454



##########
File path: graphics/nxmu/nxmu_server.c
##########
@@ -86,10 +86,10 @@ static inline void nxmu_connect(FAR struct nxmu_conn_s *conn)
    * client
    */
 
-  ret = nxmq_open(mqname, O_WRONLY, 0, NULL, &conn->swrmq);
-  if (ret < 0)
+  conn->swrmq = nxmq_open(mqname, O_WRONLY);
+  if (conn->swrmq == (mqd_t)-1)
     {
-      gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, ret);
+      gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, errno);

Review comment:
       OK

##########
File path: graphics/nxmu/nxmu_server.c
##########
@@ -86,10 +86,10 @@ static inline void nxmu_connect(FAR struct nxmu_conn_s *conn)
    * client
    */
 
-  ret = nxmq_open(mqname, O_WRONLY, 0, NULL, &conn->swrmq);
-  if (ret < 0)
+  conn->swrmq = nxmq_open(mqname, O_WRONLY);
+  if (conn->swrmq == (mqd_t)-1)

Review comment:
       OK

##########
File path: graphics/nxmu/nxmu_server.c
##########
@@ -190,12 +190,12 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
   attr.mq_msgsize = NX_MXSVRMSGLEN;
   attr.mq_flags   = 0;
 
-  ret = nxmq_open(mqname, O_RDONLY | O_CREAT,
-                  0666, &attr, &nxmu->conn.crdmq);
-  if (ret < 0)
+  nxmu->conn.crdmq = nxmq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr);

Review comment:
       OK
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org