From 77416baba4e224de0784d078574ccac2e283e7dd Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Thu, 29 Oct 2026 21:20:51 +0800 Subject: [PATCH] system/nxinit: drop unreachable error checks init_service_refresh() and init_action_run_command() only return non-negative wait times and report errors through the ppoll() branch below, so the t1/t2 < 0 checks in the main loop are dead code (Coverity). Assisted-by: OpenCode:mimo-v2.6-pro Signed-off-by: wangjianyu3 --- system/nxinit/init.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/system/nxinit/init.c b/system/nxinit/init.c index d0329a11419..6f4f4747dc2 100644 --- a/system/nxinit/init.c +++ b/system/nxinit/init.c @@ -304,18 +304,6 @@ int main(int argc, FAR char *argv[]) struct timespec timeout; int t = MIN(t1, t2); - if (t1 < 0) - { - r = t1; - break; - } - - if (t2 < 0) - { - r = t2; - break; - } - r = ppoll(pfds, nitems(pfds), MS2TIMESPEC(&timeout, t), &mask); if (r < 0 && errno != EINTR) {