This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 5c3f14ae76a6187a13e9f54b90071d1090f208c2 Author: wangjianyu3 <[email protected]> AuthorDate: Tue Aug 25 01:18:04 2026 +0800 system/nxinit: fix truncated line loss in config parser init_parse_config_lines() had a dead early "continue" for a truly empty line (buf == "\0") that skipped the memmove() bookkeeping its sibling whitespace-only-line branch performs. When a real empty line appeared mid-buffer, subsequent bytes were never shifted to the front of the working buffer, corrupting the remaining-length tracking and silently dropping every line after it for that refill chunk. The whitespace-skip loop right below already handles the empty-string case correctly (the loop body never executes, so it falls straight into the "only whitespace" -> memmove -> continue path), so the buggy early exit is simply redundant and removed. Assisted-by: GitHubCopilot:claude-sonnet-5 Signed-off-by: wangjianyu3 <[email protected]> --- system/nxinit/parser.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/system/nxinit/parser.c b/system/nxinit/parser.c index ced92a2d8..8ef6508d7 100644 --- a/system/nxinit/parser.c +++ b/system/nxinit/parser.c @@ -56,10 +56,6 @@ static int init_parse_config_lines(FAR const struct parser_s *parser, *(nl++) = '\0'; *len -= nl - buf; init_debug("Line %-3zu '%s'", ++*line, buf); - if (*buf == '\0') - { - continue; - } /* Skip empty lines and lines containing only whitespace */
