summaryrefslogtreecommitdiffstats
path: root/src/proc_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/proc_stat.c')
-rw-r--r--src/proc_stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proc_stat.c b/src/proc_stat.c
index 907b659d..d1aefb73 100644
--- a/src/proc_stat.c
+++ b/src/proc_stat.c
@@ -54,7 +54,7 @@ static int read_per_core_files(struct cpu_chart *all_cpu_charts, size_t len, siz
}
ssize_t ret = read(f->fd, buf, 50);
- if(unlikely(ret == -1)) {
+ if(unlikely(ret < 0)) {
// cannot read that file
error("Cannot read file '%s'", f->filename);