projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fc6a70
)
- Fixed division by 0 on small values
author
Bart Polot
<bart@net.in.tum.de>
Tue, 20 Dec 2011 17:23:06 +0000
(17:23 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Tue, 20 Dec 2011 17:23:06 +0000
(17:23 +0000)
src/testing/testing_peergroup.c
patch
|
blob
|
history
diff --git
a/src/testing/testing_peergroup.c
b/src/testing/testing_peergroup.c
index 1d9d3ba88379d8e6bd103a5989b7d675dd7b5aa0..bf69a7fc8aac996467445fb8875b3280f9a1cdcc 100644
(file)
--- a/
src/testing/testing_peergroup.c
+++ b/
src/testing/testing_peergroup.c
@@
-183,7
+183,7
@@
create_meter (unsigned int total, char *start_string, int print)
ret = GNUNET_malloc (sizeof (struct ProgressMeter));
ret->print = print;
ret->total = total;
- ret->modnum =
total / 4
;
+ ret->modnum =
(total / 4 == 0) ? 1 : (total / 4)
;
ret->dotnum = (total / 50) + 1;
if (start_string != NULL)
ret->startup_string = GNUNET_strdup (start_string);