diff --git a/fs/procfs/fs_procfscritmon.c b/fs/procfs/fs_procfscritmon.c index 427e0b8df9..02a92cee38 100644 --- a/fs/procfs/fs_procfscritmon.c +++ b/fs/procfs/fs_procfscritmon.c @@ -181,12 +181,10 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr, FAR off_t *offset, int cpu) { struct timespec maxtime; - size_t remaining; size_t linesize; size_t copysize; size_t totalsize; - remaining = buflen; totalsize = 0; /* Convert the for maximum time pre-emption disabled */ @@ -214,7 +212,6 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr, totalsize += copysize; buffer += copysize; - remaining -= copysize; if (totalsize >= buflen) {