From feacfeae250cafb7a6f00d54185dcc8c8b0a3754 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 7 Jan 2017 07:13:04 -0600 Subject: [PATCH] procfs: Correct to snprintf-related errors in fs_procfsproc.c. Resolves issue #24 --- fs/procfs/fs_procfsproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index f15ef0522ab..db426ee5ef7 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -960,7 +960,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile, #endif #if CONFIG_NSOCKET_DESCRIPTORS > 0 - linesize = snprintf(procfile->line, STATUS_LINELEN, "\n%3-s %-2s %-3s %s\n", + linesize = snprintf(procfile->line, STATUS_LINELEN, "\n%-3s %-2s %-3s %s\n", "SD", "RF", "TYP", "FLAGS"); copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset); @@ -983,7 +983,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile, { linesize = snprintf(procfile->line, STATUS_LINELEN, "%3d %2d %3d %02x", i + CONFIG_NFILE_DESCRIPTORS, - (long)socket->s_crefs, socket->s_type, socket->s_flags); + socket->s_crefs, socket->s_type, socket->s_flags); copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset); totalsize += copysize;