fix parentheses in cc1457c4f0
This commit is contained in:
parent
8317709b95
commit
42e61c4f6e
@ -29,8 +29,8 @@ void print_cpu_usage(const char *format) {
|
|||||||
#if defined(LINUX)
|
#if defined(LINUX)
|
||||||
static char statpath[512];
|
static char statpath[512];
|
||||||
strcpy(statpath, "/proc/stat");
|
strcpy(statpath, "/proc/stat");
|
||||||
if (!slurp(statpath, buf, sizeof(buf) ||
|
if (!slurp(statpath, buf, sizeof(buf)) ||
|
||||||
sscanf(buf, "cpu %d %d %d %d", &curr_user, &curr_nice, &curr_system, &curr_idle) != 4))
|
sscanf(buf, "cpu %d %d %d %d", &curr_user, &curr_nice, &curr_system, &curr_idle) != 4)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
curr_total = curr_user + curr_nice + curr_system + curr_idle;
|
curr_total = curr_user + curr_nice + curr_system + curr_idle;
|
||||||
|
Loading…
Reference in New Issue
Block a user