Remove the duplicated _NX_ and _MQ_ macro

reuse the definition come from include/nuttx/fs/fs.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-02-15 22:29:45 +08:00
committed by Abdelatif Guettouche
parent f3043d133e
commit 35ec84ffca
4 changed files with 5 additions and 13 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ int nx_eventhandler(NXHANDLE handle)
nbytes = _MQ_RECEIVE(conn->crdmq, buffer, NX_MXCLIMSGLEN, 0);
if (nbytes < 0)
{
int errcode = _MQ_GETERRNO(nbytes);
int errcode = _NX_GETERRNO(nbytes);
/* EINTR is not an error. The wait was interrupted by a signal and
* we just need to try reading again.
@@ -154,7 +154,7 @@ int nx_eventhandler(NXHANDLE handle)
else
{
gerr("ERROR: _MQ_RECEIVE failed: %d\n", errcode);
_MQ_SETERRNO(nbytes);
_NX_SETERRNO(nbytes);
return ERROR;
}
}
+3 -1
View File
@@ -86,7 +86,9 @@ int nxmu_sendserver(FAR struct nxmu_conn_s *conn, FAR const void *msg,
ret = _MQ_SEND(conn->cwrmq, msg, msglen, NX_SVRMSG_PRIO);
if (ret < 0)
{
gerr("ERROR: _MQ_SEND failed: %d\n", _MQ_GETERRNO(ret));
_NX_SETERRNO(ret);
gerr("ERROR: _MQ_SEND failed: %d\n", _NX_GETERRNO(ret));
ret = ERROR;
}
return ret;