summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/print_cpu_usage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/print_cpu_usage.c b/src/print_cpu_usage.c
index 143cf40..1d3bac8 100644
--- a/src/print_cpu_usage.c
+++ b/src/print_cpu_usage.c
@@ -29,8 +29,8 @@ void print_cpu_usage(const char *format) {
#if defined(LINUX)
static char statpath[512];
strcpy(statpath, "/proc/stat");
- if (!slurp(statpath, buf, sizeof(buf) ||
- sscanf(buf, "cpu %d %d %d %d", &curr_user, &curr_nice, &curr_system, &curr_idle) != 4))
+ if (!slurp(statpath, buf, sizeof(buf)) ||
+ sscanf(buf, "cpu %d %d %d %d", &curr_user, &curr_nice, &curr_system, &curr_idle) != 4)
goto error;
curr_total = curr_user + curr_nice + curr_system + curr_idle;