From 40e5092e9a5db88b4c9b62cb341596fbf6ce1cf8 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 20 Dec 2011 17:23:06 +0000 Subject: - Fixed division by 0 on small values --- src/testing/testing_peergroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing/testing_peergroup.c') 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) 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); -- cgit v1.2.3