diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-22 18:48:27 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-22 18:48:27 -0300 |
commit | 28d4cad5fe728a0b116e5c91e426dca4eff14f78 (patch) | |
tree | a7e1005c7ec9a5a7bf1a946a78810fba8679c462 | |
parent | 2ee1c4127419e558cd68c231b019f28aa8839e5e (diff) |
xread may return -1.
-rw-r--r-- | ProcessList.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c index 5ba396b7..3d6341c4 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -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)); |