mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Correct some bad parameter checking
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5197 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -111,8 +111,8 @@ int nx_block(NXWINDOW hwnd, FAR void *arg)
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!hwnd)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
set_errno(EINVAL);
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg,
|
||||
/* Sanity checking */
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!conn || conn->swrmq)
|
||||
if (!conn || !conn->swrmq)
|
||||
{
|
||||
errno = EINVAL;
|
||||
set_errno(EINVAL);
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -93,9 +93,9 @@ int nxmu_sendserver(FAR struct nxfe_conn_s *conn, FAR const void *msg,
|
||||
/* Sanity checking */
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!conn || conn->cwrmq)
|
||||
if (!conn || !conn->cwrmq)
|
||||
{
|
||||
errno = EINVAL;
|
||||
set_errno(EINVAL);
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user