summaryrefslogtreecommitdiff
path: root/sysdeps/linux/cpu.c
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2004-05-26 16:52:32 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2004-05-26 16:52:32 +0000
commit5af13a2a6a1a42a2e634b58a16eba517e74096fc (patch)
treebac0bcdd13d0115d83d605dbad69dbf1d2b6610d /sysdeps/linux/cpu.c
parent0cdaaf1f62f36e7002501d5d9ebc23e98b43a1e4 (diff)
downloadlibgtop-5af13a2a6a1a42a2e634b58a16eba517e74096fc.tar.gz
Cleaned whitespaces.
* cpu.c: (glibtop_get_cpu_s): Cleaned whitespaces. * open.c: (get_linux_version), (glibtop_open_s): Removed get_linux_version() Cleaned. Remove static struct utsname.
Diffstat (limited to 'sysdeps/linux/cpu.c')
-rw-r--r--sysdeps/linux/cpu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c
index 0a94f832..87f923c5 100644
--- a/sysdeps/linux/cpu.c
+++ b/sysdeps/linux/cpu.c
@@ -55,7 +55,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
char buffer [BUFSIZ], *p;
int fd, len;
- guint i;
+ int i;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
@@ -87,19 +87,19 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
/* 2.6 kernel */
buf->idle += strtoull(p, &p, 0); /* "iowait" */
buf->sys += strtoull(p, &p, 0); /* "irq" */
- buf->sys += strtoull(p, &p, 0); /* "softirq" */
+ buf->sys += strtoull(p, &p, 0); /* "softirq" */
- buf->total = buf->user + buf->nice + buf->sys + buf->idle;
+ buf->total = buf->user + buf->nice + buf->sys + buf->idle;
buf->frequency = 100;
buf->flags = _glibtop_sysdeps_cpu;
- /*
+ /*
* PER CPU
*/
-
+
for (i = 0; i < GLIBTOP_NCPU && i < server->ncpu; i++) {
-
+
p = skip_line(p); /* move to ^ */
if (strncmp (p, "cpu", 3) || !isdigit (p [3]))