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:
126827b
)
fixed divide by zero bug
author
Nathan S. Evans
<evans@in.tum.de>
Thu, 24 Feb 2011 16:36:40 +0000
(16:36 +0000)
committer
Nathan S. Evans
<evans@in.tum.de>
Thu, 24 Feb 2011 16:36:40 +0000
(16:36 +0000)
src/testing/testing_group.c
patch
|
blob
|
history
diff --git
a/src/testing/testing_group.c
b/src/testing/testing_group.c
index f1e5ba1e5c92469e1a280419c3ac565ab7beddd1..5c5f807988c82ca9f0b596cb13caf704f8a1cda2 100644
(file)
--- a/
src/testing/testing_group.c
+++ b/
src/testing/testing_group.c
@@
-1014,6
+1014,8
@@
create_meter(unsigned int total, char * start_string, int print)
ret->print = print;
ret->total = total;
ret->modnum = total / 4;
+ if (ret->modnum == 0) /* Divide by zero check */
+ ret->modnum = 1;
ret->dotnum = (total / 50) + 1;
if (start_string != NULL)
ret->startup_string = GNUNET_strdup(start_string);