mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
xread may return -1.
This commit is contained in:
@ -414,7 +414,7 @@ static bool ProcessList_readStatFile(Process *process, const char* dirname, cons
|
||||
|
||||
int size = xread(fd, buf, MAX_READ);
|
||||
close(fd);
|
||||
if (!size) return false;
|
||||
if (size <= 0) return false;
|
||||
buf[size] = '\0';
|
||||
|
||||
assert(process->pid == atoi(buf));
|
||||
|
Reference in New Issue
Block a user