nshlib: Fix static scanning errors

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
This commit is contained in:
wangmingrong 2023-09-01 15:01:35 +08:00 committed by Xiang Xiao
parent b7e08d4fba
commit 5e59b0b384

View File

@ -88,7 +88,7 @@ static int getpid_callback(FAR struct nsh_vtbl_s *vtbl,
return 0;
}
len = read(fd, buffer, sizeof(buffer));
len = read(fd, buffer, sizeof(buffer) - 1);
close(fd);
if (len < 0)
{