Skip to content

Commit 13f2353

Browse files
zhang jiaoakpm00
authored andcommitted
fs/proc/base.c: fix the wrong format specifier
Use '%d' instead of '%u' for int. Link: https://lkml.kernel.org/r/20250903083948.2536-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Thomas Gleinxer <tglx@linutronix.de> Cc: xu xin <xu.xin16@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 37aa782 commit 13f2353

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/proc/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3945,7 +3945,7 @@ static int proc_task_readdir(struct file *file, struct dir_context *ctx)
39453945
tid = task_pid_nr_ns(task, ns);
39463946
if (!tid)
39473947
continue; /* The task has just exited. */
3948-
len = snprintf(name, sizeof(name), "%u", tid);
3948+
len = snprintf(name, sizeof(name), "%d", tid);
39493949
if (!proc_fill_cache(file, ctx, name, len,
39503950
proc_task_instantiate, task, NULL)) {
39513951
/* returning this tgid failed, save it as the first

0 commit comments

Comments
 (0)