tload: remove unnecessary goto

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-01-21 23:29:02 +01:00
parent 8f7eefc9c8
commit 2b99362139

20
tload.c
View File

@ -151,17 +151,21 @@ int main(int argc, char **argv)
loadavg(&av[0], &av[1], &av[2]);
repeat:
lines = av[0] * scale_fact;
row = nrows - 1;
while (1) {
lines = av[0] * scale_fact;
row = nrows - 1;
while (--lines >= 0) {
*(screen + row * ncols + col) = '*';
if (--row < 0) {
scale_fact /= 2.0;
goto repeat;
while (0 <= --lines) {
*(screen + row * ncols + col) = '*';
if (--row < 0) {
scale_fact /= 2.0;
break;
}
}
if (0 < row)
break;
}
while (row >= 0)
*(screen + row-- * ncols + col) = ' ';