1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 11:05:18 +00:00

Remove some strange network related code

Reported by norsetto.
This code disallows network traffic to be 0.
Brenden says it once had a purpose, but noone can think of what would that be atm.
This commit is contained in:
Pavel Labath 2009-12-07 21:13:04 +01:00
parent 37a920de59
commit b1cbc64f60

View File

@ -480,12 +480,6 @@ void update_net_stats(void)
curtmp1 = curtmp1 + ns->net_rec[i]; curtmp1 = curtmp1 + ns->net_rec[i];
curtmp2 = curtmp2 + ns->net_trans[i]; curtmp2 = curtmp2 + ns->net_trans[i];
} }
if (curtmp1 == 0) {
curtmp1 = 1;
}
if (curtmp2 == 0) {
curtmp2 = 1;
}
ns->recv_speed = curtmp1 / (double) info.net_avg_samples; ns->recv_speed = curtmp1 / (double) info.net_avg_samples;
ns->trans_speed = curtmp2 / (double) info.net_avg_samples; ns->trans_speed = curtmp2 / (double) info.net_avg_samples;
if (info.net_avg_samples > 1) { if (info.net_avg_samples > 1) {