notaz.gp2x.de
/
saturn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb9a1e3
)
fix progress for small transfers
author
notaz
<notasas@gmail.com>
Tue, 9 Sep 2014 22:56:09 +0000
(
01:56
+0300)
committer
notaz
<notasas@gmail.com>
Tue, 9 Sep 2014 22:56:09 +0000
(
01:56
+0300)
datalink.c
patch
|
blob
|
blame
|
history
diff --git
a/datalink.c
b/datalink.c
index
a2bdc70
..
6a37179
100644
(file)
--- a/
datalink.c
+++ b/
datalink.c
@@
-107,6
+107,9
@@
static void print_progress(int done, int total)
printf("%06x/%06x |", done, total);
step = total / 20;
+ if (step <= 0)
+ step = 1;
+
for (i = step; i <= total; i += step)
printf("%c", done >= i ? '=' : '-');
printf("| %3d%%", done * 100 / total);