gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18728 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r18728 - gnunet/src/testing
Date: Tue, 20 Dec 2011 18:23:06 +0100

Author: bartpolot
Date: 2011-12-20 18:23:06 +0100 (Tue, 20 Dec 2011)
New Revision: 18728

Modified:
   gnunet/src/testing/testing_peergroup.c
Log:
- Fixed division by 0 on small values

Modified: gnunet/src/testing/testing_peergroup.c
===================================================================
--- gnunet/src/testing/testing_peergroup.c      2011-12-20 17:02:24 UTC (rev 
18727)
+++ gnunet/src/testing/testing_peergroup.c      2011-12-20 17:23:06 UTC (rev 
18728)
@@ -183,7 +183,7 @@
   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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]