aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-12-20 17:23:06 +0000
committerBart Polot <bart@net.in.tum.de>2011-12-20 17:23:06 +0000
commit40e5092e9a5db88b4c9b62cb341596fbf6ce1cf8 (patch)
treef43f36672fc57528668fc95d26f88f247a63923f
parent4fc6a7040d573ecd291c70da9c800e842b260963 (diff)
downloadgnunet-40e5092e9a5db88b4c9b62cb341596fbf6ce1cf8.tar.gz
gnunet-40e5092e9a5db88b4c9b62cb341596fbf6ce1cf8.zip
- Fixed division by 0 on small values
-rw-r--r--src/testing/testing_peergroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index 1d9d3ba88..bf69a7fc8 100644
--- 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)
183 ret = GNUNET_malloc (sizeof (struct ProgressMeter)); 183 ret = GNUNET_malloc (sizeof (struct ProgressMeter));
184 ret->print = print; 184 ret->print = print;
185 ret->total = total; 185 ret->total = total;
186 ret->modnum = total / 4; 186 ret->modnum = (total / 4 == 0) ? 1 : (total / 4);
187 ret->dotnum = (total / 50) + 1; 187 ret->dotnum = (total / 50) + 1;
188 if (start_string != NULL) 188 if (start_string != NULL)
189 ret->startup_string = GNUNET_strdup (start_string); 189 ret->startup_string = GNUNET_strdup (start_string);