summaryrefslogtreecommitdiff
path: root/multiload/linux-proc.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-27 17:07:37 +0100
committerinfirit <[email protected]>2014-11-27 17:14:38 +0100
commit11a661f6d9f554a73ccd8508ad56fdb5be5e7b91 (patch)
treed53a5c1ead98fffed23f525d3c5b08cea7ceab2d /multiload/linux-proc.c
parent8397197bdad2f4a067d4891f18702c78fa7ca969 (diff)
downloadmate-applets-11a661f6d9f554a73ccd8508ad56fdb5be5e7b91.tar.bz2
mate-applets-11a661f6d9f554a73ccd8508ad56fdb5be5e7b91.tar.xz
multiload: Remove unused code
Diffstat (limited to 'multiload/linux-proc.c')
-rw-r--r--multiload/linux-proc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c
index e1687224..13ebc5ff 100644
--- a/multiload/linux-proc.c
+++ b/multiload/linux-proc.c
@@ -226,7 +226,7 @@ GetMemory (int Maximum, int data [5], LoadGraph *g)
void
GetSwap (int Maximum, int data [2], LoadGraph *g)
{
- int used, free;
+ int used;
glibtop_swap swap;
@@ -235,11 +235,9 @@ GetSwap (int Maximum, int data [2], LoadGraph *g)
if (swap.total == 0) {
used = 0;
- free = Maximum;
}
else {
used = rint (Maximum * (float)swap.used / swap.total);
- free = rint (Maximum * (float)swap.free / swap.total);
}
data [0] = used;
@@ -252,7 +250,7 @@ GetLoadAvg (int Maximum, int data [2], LoadGraph *g)
const float per_cpu_max_loadavg = 5.0f;
float max_loadavg;
float loadavg1;
- float used, free;
+ float used;
glibtop_loadavg loadavg;
glibtop_get_loadavg (&loadavg);
@@ -265,7 +263,6 @@ GetLoadAvg (int Maximum, int data [2], LoadGraph *g)
loadavg1 = MIN(loadavg.loadavg[0], max_loadavg);
used = loadavg1 / max_loadavg;
- free = (max_loadavg - loadavg1) / max_loadavg;
data [0] = rint ((float) Maximum * used);
data [1] = Maximum - data[0];