summaryrefslogtreecommitdiff
path: root/multiload/src/load-graph.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-15 06:19:38 +0100
committerVictor Kareh <[email protected]>2020-12-17 07:29:54 -0500
commit99d8c51f427590660ac0c023b90ccf9009db0b17 (patch)
treec762e2fcdd42ca016d8b7552623942101d0add52 /multiload/src/load-graph.c
parent60cb54fb957857fb64dd93b878b46710948de750 (diff)
downloadmate-applets-99d8c51f427590660ac0c023b90ccf9009db0b17.tar.bz2
mate-applets-99d8c51f427590660ac0c023b90ccf9009db0b17.tar.xz
multiload: compute combined network data on GetNet once
Diffstat (limited to 'multiload/src/load-graph.c')
-rw-r--r--multiload/src/load-graph.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/multiload/src/load-graph.c b/multiload/src/load-graph.c
index d613ed59..c9ed8d03 100644
--- a/multiload/src/load-graph.c
+++ b/multiload/src/load-graph.c
@@ -96,17 +96,13 @@ load_graph_draw (LoadGraph *g)
{
guint maxnet = 1;
gint segments = 1;
- gint combined;
guint net_threshold;
for (i = 0; i < g->draw_width; i++)
{
g->pos [i] = g->draw_height - 1;
- combined = g->data[i][0] +
- g->data[i][1] +
- g->data[i][2];
- if (combined > maxnet)
- maxnet = combined;
+ if (g->data[i][3] > maxnet)
+ maxnet = g->data[i][3];
}
//printf("max = %d ", maxnet);
guint level = 0;