meminfo: fix g++ warning for oob write

g++ doesn't realize that read can only return -1
This commit is contained in:
Bananymous 2023-10-24 16:49:48 +03:00
parent e8d20bc653
commit adbbdf73c4
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ int main()
while (ssize_t nread = read(fd, path_buffer, sizeof(path_buffer) - 1))
{
if (nread == -1)
if (nread < 0)
{
perror("read");
break;