]> git.sur5r.net Git - i3/i3status/commitdiff
fix parentheses in cc1457c4f0f4cccb8bec326dd0bb13082ac806e6
authorMateusz Poszwa <old4@o2.pl>
Mon, 29 Aug 2011 13:28:01 +0000 (15:28 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 29 Aug 2011 14:06:40 +0000 (16:06 +0200)
src/print_cpu_usage.c

index 143cf400e5ed64721d0df5c4b52503df6941e900..1d3bac878accbee67bfbe43a91acc0a0e15176eb 100644 (file)
@@ -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;