You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2021/02/20 18:11:37 UTC

[incubator-nuttx] 01/02: fs/procfs: Avoid the duplicated 0x prefix in pthread cmdline

This is an automated email from the ASF dual-hosted git repository.

davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 72928cebcfdc7df529d844c6e770177a4aa98d9a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Feb 19 17:20:00 2021 +0800

    fs/procfs: Avoid the duplicated 0x prefix in pthread cmdline
    
    like this:
    ... <pthread> 0x0x341de68c
    by removing "0x" from format string
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 fs/procfs/fs_procfsproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index 9222d24..08bdac2 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -689,7 +689,7 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile,
     {
       FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb;
 
-      linesize   = snprintf(procfile->line, STATUS_LINELEN, " 0x%p\n",
+      linesize   = snprintf(procfile->line, STATUS_LINELEN, " %p\n",
                             ptcb->arg);
       copysize   = procfs_memcpy(procfile->line, linesize, buffer,
                                  remaining, &offset);