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:
parent
04c4f5d229
commit
2424b12857
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue