diff options
author | Mateusz Poszwa <old4@o2.pl> | 2011-08-29 15:28:01 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2011-08-29 16:06:40 +0200 |
commit | 42e61c4f6e36ace401d363ee002688d5bbb78b6e (patch) | |
tree | f3ed46f73a2c98f65787481b28744f222aee4ca0 | |
parent | 8317709b95a7d61dc99b13f197093f23c197fbf6 (diff) |
fix parentheses in cc1457c4f0f4cccb8bec326dd0bb13082ac806e6
-rw-r--r-- | src/print_cpu_usage.c | 4 |
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; |