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.git

commit 0293fb535661cd09f2adfd663570aa80ddc1e7ea
Author: yangsong8 <[email protected]>
AuthorDate: Mon Nov 23 17:39:53 2026 +0800

    tools/cfgdefine: fix pre-existing nxstyle errors
    
    Fix statement-on-same-line and alignment issues flagged by nxstyle.
    No functional change.
    
    Assisted-by: Kiro:claude-opus-5-5
    Signed-off-by: yangsong8 <[email protected]>
---
 tools/cfgdefine.c | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/tools/cfgdefine.c b/tools/cfgdefine.c
index 674bf3c02fa..8a0ccdb0462 100644
--- a/tools/cfgdefine.c
+++ b/tools/cfgdefine.c
@@ -92,7 +92,11 @@ static const char *dequote_list[] =
 
 static char *skip_space(char *ptr)
 {
-  while (*ptr && isspace((int)*ptr)) ptr++;
+  while (*ptr && isspace((int)*ptr))
+    {
+      ptr++;
+    }
+
   return ptr;
 }
 
@@ -100,7 +104,11 @@ static char *skip_space(char *ptr)
 
 static char *find_name_end(char *ptr)
 {
-  while (*ptr && (isalnum((int)*ptr) || *ptr == '_')) ptr++;
+  while (*ptr && (isalnum((int)*ptr) || *ptr == '_'))
+    {
+      ptr++;
+    }
+
   return ptr;
 }
 
@@ -112,12 +120,24 @@ static char *find_value_end(char *ptr)
     {
       if (*ptr == '"')
         {
-          do ptr++; while (*ptr && (*ptr != '"' || *(ptr - 1) == '\\'));
-          if (*ptr) ptr++;
+          do
+            {
+              ptr++;
+            }
+          while (*ptr && (*ptr != '"' || *(ptr - 1) == '\\'));
+
+          if (*ptr)
+            {
+              ptr++;
+            }
         }
       else
         {
-          do ptr++; while (*ptr && !isspace((int)*ptr) && *ptr != '"');
+          do
+            {
+              ptr++;
+            }
+          while (*ptr && !isspace((int)*ptr) && *ptr != '"');
         }
     }
 
@@ -170,7 +190,7 @@ static void parse_line(char *ptr, char **varname, char 
**varval)
        */
 
       *ptr = '\0';
-       ptr = skip_space(ptr + 1);
+      ptr = skip_space(ptr + 1);
     }
 
   /* Verify that the equal sign is present */

Reply via email to