From: Mateusz Poszwa Date: Mon, 29 Aug 2011 13:28:01 +0000 (+0200) Subject: fix parentheses in cc1457c4f0f4cccb8bec326dd0bb13082ac806e6 X-Git-Tag: 2.4~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=42e61c4f6e36ace401d363ee002688d5bbb78b6e;p=i3%2Fi3status fix parentheses in cc1457c4f0f4cccb8bec326dd0bb13082ac806e6 --- 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;