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:
parent
41396d5960
commit
c48a617cd2
6 changed files with 14 additions and 9 deletions
|
@ -3417,4 +3417,6 @@
|
||||||
not an ILI93xx.
|
not an ILI93xx.
|
||||||
* configs/shenzhou/src/up_ssd1289.c: The LCD is basically functional
|
* configs/shenzhou/src/up_ssd1289.c: The LCD is basically functional
|
||||||
on the Shenzhou board.
|
on the Shenzhou board.
|
||||||
|
* graphics/nxmu: Correct some bad parameter checking that caused
|
||||||
|
failures when DEBUG was enabled.
|
||||||
|
|
||||||
|
|
6
Kconfig
6
Kconfig
|
@ -230,7 +230,11 @@ config DEBUG_VERBOSE
|
||||||
bool "Enable Debug Verbose Output"
|
bool "Enable Debug Verbose Output"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Enables verbose debug output (assuming debug output is enabled)
|
Enables verbose debug output (assuming debug output is enabled). As a
|
||||||
|
general rule, when DEBUG is enabled only errors will be reported in the debug
|
||||||
|
output. But if you also enable DEBUG_VERBOSE, then very chatty (and
|
||||||
|
often annoying) output will be generated. This means there are two levels
|
||||||
|
of debug output: errors-only and everything.
|
||||||
|
|
||||||
config DEBUG_ENABLE
|
config DEBUG_ENABLE
|
||||||
bool "Enable Debug Controls"
|
bool "Enable Debug Controls"
|
||||||
|
|
|
@ -572,7 +572,7 @@ static void ads7843e_worker(FAR void *arg)
|
||||||
/* Check for pen up or down by reading the PENIRQ GPIO. */
|
/* Check for pen up or down by reading the PENIRQ GPIO. */
|
||||||
|
|
||||||
pendown = config->pendown(config);
|
pendown = config->pendown(config);
|
||||||
dbg("pendown: %d\n", pendown); // REMOVE ME
|
|
||||||
/* Handle the change from pen down to pen up */
|
/* Handle the change from pen down to pen up */
|
||||||
|
|
||||||
if (!pendown)
|
if (!pendown)
|
||||||
|
@ -643,7 +643,6 @@ dbg("pendown: %d\n", pendown); // REMOVE ME
|
||||||
/* Exit, re-enabling ADS7843E interrupts */
|
/* Exit, re-enabling ADS7843E interrupts */
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
dbg("Exiting\n"); // REMOVE ME
|
|
||||||
(void)ads7843e_sendcmd(priv, ADS7843_CMD_ENABPINIRQ);
|
(void)ads7843e_sendcmd(priv, ADS7843_CMD_ENABPINIRQ);
|
||||||
config->enable(config, true);
|
config->enable(config, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,8 +111,8 @@ int nx_block(NXWINDOW hwnd, FAR void *arg)
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
if (!hwnd)
|
if (!hwnd)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
set_errno(EINVAL);
|
||||||
return NULL;
|
return ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -93,9 +93,9 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg,
|
||||||
/* Sanity checking */
|
/* Sanity checking */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
if (!conn || conn->swrmq)
|
if (!conn || !conn->swrmq)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -93,9 +93,9 @@ int nxmu_sendserver(FAR struct nxfe_conn_s *conn, FAR const void *msg,
|
||||||
/* Sanity checking */
|
/* Sanity checking */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
if (!conn || conn->cwrmq)
|
if (!conn || !conn->cwrmq)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue