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:
f6a270a
)
allow zero
author
Christian Grothoff
<christian@grothoff.org>
Thu, 21 Oct 2010 10:14:13 +0000
(10:14 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Thu, 21 Oct 2010 10:14:13 +0000
(10:14 +0000)
src/util/load.c
patch
|
blob
|
history
diff --git
a/src/util/load.c
b/src/util/load.c
index b7ab01540b18c540921872dea78abc55a07da71d..3f03e32e7392719c6c5fe453b567428b1768e058 100644
(file)
--- a/
src/util/load.c
+++ b/
src/util/load.c
@@
-119,9
+119,10
@@
GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline)
{
struct GNUNET_LOAD_Value *ret;
- GNUNET_assert (autodecline.value != 0);
ret = GNUNET_malloc (sizeof (struct GNUNET_LOAD_Value));
ret->autodecline = autodecline;
+ if (ret->autodecline.value == 0)
+ ret->autodecline.value = 1;
ret->last_update = GNUNET_TIME_absolute_get ();
return ret;
}
@@
-139,6
+140,8
@@
GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
{
internal_update (load);
load->autodecline = autodecline;
+ if (load->autodecline.value == 0)
+ load->autodecline.value = 1;
}