fs/procfs: fix output format of fd info

Refered to PRINTF(3), the [v]snprintf returns the number of characters
printed (excluding the null byte used to end output to strings).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2025-06-23 17:00:07 +08:00 committed by Xiang Xiao
parent 04c4f5d229
commit 2424b12857

View file

@ -1330,7 +1330,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
fdp->f_backtrace,
CONFIG_FS_BACKTRACE);
#endif
procfile->line[linesize - 2] = '\n';
procfile->line[linesize - 1] = '\n';
}
file_put(filep);