mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
apps/nxinit: Fix uninitialized variable
Without debug enabled, the code would not compile due to checking `WIFEXITED(wstatus)` when `wstatus` was uninitialized. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
parent
2b5899c7d4
commit
418cf21224
1 changed files with 1 additions and 7 deletions
|
|
@ -80,13 +80,7 @@ static void reap_process(FAR struct service_manager_s *sm,
|
|||
|
||||
for (; ; )
|
||||
{
|
||||
pid = waitpid(-1,
|
||||
#ifdef CONFIG_SYSTEM_NXINIT_DEBUG
|
||||
&wstatus,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
WNOHANG);
|
||||
pid = waitpid(-1, &wstatus, WNOHANG);
|
||||
if (pid <= 0)
|
||||
{
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue