This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 78791394a system/nxinit: drop unreachable error checks
78791394a is described below
commit 78791394a8cd5c0caf5e23ccca51e924abceb94f
Author: wangjianyu3 <[email protected]>
AuthorDate: Thu Oct 29 21:20:51 2026 +0800
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 <[email protected]>
---
system/nxinit/init.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/system/nxinit/init.c b/system/nxinit/init.c
index d0329a114..6f4f4747d 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)
{