mirror of
https://github.com/apache/nuttx.git
synced 2026-09-22 06:04:28 +08:00
procfs/cpuinfo: Zero copylen in cpuinfo_read
to avoid return the negative number Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
449197c188
commit
19baa56fb5
@@ -157,6 +157,10 @@ static ssize_t cpuinfo_read(FAR struct file *filep, FAR char *buffer,
|
||||
{
|
||||
filep->f_pos += copylen;
|
||||
}
|
||||
else
|
||||
{
|
||||
copylen = 0;
|
||||
}
|
||||
|
||||
return copylen;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user