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 9962e33c4ab40a3db5f026bee2cea73b24965db4
Author: huojianchao <[email protected]>
AuthorDate: Fri Nov 20 11:43:15 2026 +0800

    libs/libc/backtrace: fix the indentation in backtrace_expand()
    
    The block that expands the pool is at the top level of the function but
    was indented one level too deep, which nxstyle reports as "Bad left
    brace alignment" and "Bad alignment".
    
    No functional change.
    
    Signed-off-by: huojianchao <[email protected]>
---
 libs/libc/misc/lib_backtrace.c | 94 +++++++++++++++++++++---------------------
 1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/libs/libc/misc/lib_backtrace.c b/libs/libc/misc/lib_backtrace.c
index 566bbd0e504..9509bbce899 100644
--- a/libs/libc/misc/lib_backtrace.c
+++ b/libs/libc/misc/lib_backtrace.c
@@ -229,54 +229,54 @@ static int backtrace_expand(FAR struct backtrace_pool_s 
*bp,
     }
 
 #if CONFIG_LIBC_BACKTRACE_LOAD_FACTOR < 100
-    {
-      /* When expanding, double the capacity of the bucket and release
-       * the old bucket.
-       */
-
-      FAR struct backtrace_entry_s **oldbucket;
-      FAR struct backtrace_entry_s **bucket;
-      FAR struct backtrace_entry_s *pool;
-      size_t poolsize = bp->capacity;
-      size_t capacity = bp->capacity * 2;
-
-      /* Drop the lock before the sleeping allocation so we neither deadlock
-       * on the pool spinlock nor block IRQs across heap allocation.
-       */
-
-      backtrace_unlock(bp, *flags);
-      bucket = lib_zalloc(sizeof(FAR struct backtrace_entry_s *) * capacity);
-      pool = lib_zalloc(sizeof(struct backtrace_entry_s) * poolsize);
-      if (bucket == NULL || pool == NULL)
-        {
-          lib_free(bucket);
-          lib_free(pool);
-          *flags = backtrace_lock(bp);
-          return -ENOMEM;
-        }
-
-      *flags = backtrace_lock(bp);
-      backtrace_rehash(bp, bucket);
-
-      for (i = 0; i < poolsize; i++)
-        {
-          sq_addlast(&pool[i].freenode, &bp->freelist);
-        }
-
-      oldbucket = bp->bucket;
-      bp->bucket = bucket;
-      bp->capacity = capacity;
-      backtrace_unlock(bp, *flags);
-
-      if (oldbucket != g_backtrace_bucket)
-        {
-          lib_free(oldbucket);
-        }
-
-      *flags = backtrace_lock(bp);
-    }
+  {
+    /* When expanding, double the capacity of the bucket and release
+     * the old bucket.
+     */
+
+    FAR struct backtrace_entry_s **oldbucket;
+    FAR struct backtrace_entry_s **bucket;
+    FAR struct backtrace_entry_s *pool;
+    size_t poolsize = bp->capacity;
+    size_t capacity = bp->capacity * 2;
+
+    /* Drop the lock before the sleeping allocation so we neither deadlock
+     * on the pool spinlock nor block IRQs across heap allocation.
+     */
+
+    backtrace_unlock(bp, *flags);
+    bucket = lib_zalloc(sizeof(FAR struct backtrace_entry_s *) * capacity);
+    pool = lib_zalloc(sizeof(struct backtrace_entry_s) * poolsize);
+    if (bucket == NULL || pool == NULL)
+      {
+        lib_free(bucket);
+        lib_free(pool);
+        *flags = backtrace_lock(bp);
+        return -ENOMEM;
+      }
+
+    *flags = backtrace_lock(bp);
+    backtrace_rehash(bp, bucket);
+
+    for (i = 0; i < poolsize; i++)
+      {
+        sq_addlast(&pool[i].freenode, &bp->freelist);
+      }
+
+    oldbucket = bp->bucket;
+    bp->bucket = bucket;
+    bp->capacity = capacity;
+    backtrace_unlock(bp, *flags);
+
+    if (oldbucket != g_backtrace_bucket)
+      {
+        lib_free(oldbucket);
+      }
+
+    *flags = backtrace_lock(bp);
+  }
 #else
-    (void)flags;
+  (void)flags;
 #endif /* CONFIG_LIBC_BACKTRACE_LOAD_FACTOR < 100 */
 
   return 0;

Reply via email to