1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

Fix broken cpu usage stuff (due to a previous commit).

This commit is contained in:
Brenden Matthews 2008-12-09 16:15:06 -07:00
parent a40cfd9702
commit 5a5e7fd8e2
2 changed files with 4 additions and 4 deletions

View File

@ -2842,7 +2842,7 @@ static struct text_object *construct_text_object(const char *s,
} else {
obj->data.cpu_index = 0;
}
DBGP2("Adding info for CPU %d", obj->data.cpu_index);
DBGP2("Adding $cpu for CPU %d", obj->data.cpu_index);
} else {
obj->data.cpu_index = 0;
}
@ -2859,7 +2859,7 @@ static struct text_object *construct_text_object(const char *s,
scan_bar(arg, &obj->a, &obj->b);
obj->data.cpu_index = 0;
}
DBGP2("Adding info for CPU %d", obj->data.cpu_index);
DBGP2("Adding $cpubar for CPU %d", obj->data.cpu_index);
END OBJ(cpugraph, INFO_CPU)
char *buf = scan_graph(arg, &obj->a, &obj->b, &obj->c, &obj->d,
&obj->e, &obj->showaslog);
@ -2872,7 +2872,7 @@ static struct text_object *construct_text_object(const char *s,
}
free(buf);
}
DBGP2("Adding info for CPU %d", obj->data.cpu_index);
DBGP2("Adding $cpugraph for CPU %d", obj->data.cpu_index);
END OBJ(loadgraph, INFO_LOADAVG)
char *buf = scan_graph(arg, &obj->a, &obj->b, &obj->c, &obj->d,
&obj->e, &obj->showaslog);

View File

@ -676,7 +676,7 @@ inline static void update_stat(void)
} else if (strncmp(buf, "cpu", 3) == 0) {
double delta;
if (isdigit(buf[3])) {
idx = atoi(&buf[3]);
idx = atoi(&buf[3]) + 1;
} else {
idx = 0;
}