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 f14e267ad2346ac6ba57704718014e2517d4e7c1
Author: yinshengkai <[email protected]>
AuthorDate: Tue Jan 14 15:14:03 2025 +0800

    mm/memdump: fix typos
    
    The '%' of the "%*p" conversion in memdump_allocnode() sat in the
    string literal that is only compiled with CONFIG_MM_BACKTRACE_SEQNO.
    Without it the format read "...%9zu*p %s", so the address was printed
    as the text "*p" and "%s" took the width argument.  Keep the whole
    conversion in the unconditional literal.
    
    Assisted-by: Kiro:claude-opus-5-5
    Signed-off-by: yinshengkai <[email protected]>
---
 mm/mm_heap/mm_memdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mm_heap/mm_memdump.c b/mm/mm_heap/mm_memdump.c
index 0db564230ea..6aff1a20302 100644
--- a/mm/mm_heap/mm_memdump.c
+++ b/mm/mm_heap/mm_memdump.c
@@ -86,9 +86,9 @@ static void memdump_allocnode(FAR struct mm_allocnode_s *node)
 
   syslog(LOG_INFO, "%6d%12zu%9zu"
 #  ifdef CONFIG_MM_BACKTRACE_SEQNO
-         "%12lu%"
+         "%12lu"
 #  endif
-         "*p %s\n",
+         "%*p %s\n",
          node->pid, nodesize, overhead,
 #  ifdef CONFIG_MM_BACKTRACE_SEQNO
          node->seqno,

Reply via email to