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:
Matteo Golin 2026-05-27 19:56:44 -04:00 committed by Alan C. Assis
parent 2b5899c7d4
commit 418cf21224

View file

@ -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;