aboutsummaryrefslogtreecommitdiff
path: root/src/util/load.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-21 10:14:13 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-21 10:14:13 +0000
commit63267491ed45e12a9b50be5c8b0b32811d95c1e2 (patch)
treeb1a73050098ba1615cddaddc46ac3dfcd1c3da04 /src/util/load.c
parentf6a270ac2ec89ed94ef00b97dd2f18b16fd6c306 (diff)
downloadgnunet-63267491ed45e12a9b50be5c8b0b32811d95c1e2.tar.gz
gnunet-63267491ed45e12a9b50be5c8b0b32811d95c1e2.zip
allow zero
Diffstat (limited to 'src/util/load.c')
-rw-r--r--src/util/load.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util/load.c b/src/util/load.c
index b7ab01540..3f03e32e7 100644
--- a/src/util/load.c
+++ b/src/util/load.c
@@ -119,9 +119,10 @@ GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline)
119{ 119{
120 struct GNUNET_LOAD_Value *ret; 120 struct GNUNET_LOAD_Value *ret;
121 121
122 GNUNET_assert (autodecline.value != 0);
123 ret = GNUNET_malloc (sizeof (struct GNUNET_LOAD_Value)); 122 ret = GNUNET_malloc (sizeof (struct GNUNET_LOAD_Value));
124 ret->autodecline = autodecline; 123 ret->autodecline = autodecline;
124 if (ret->autodecline.value == 0)
125 ret->autodecline.value = 1;
125 ret->last_update = GNUNET_TIME_absolute_get (); 126 ret->last_update = GNUNET_TIME_absolute_get ();
126 return ret; 127 return ret;
127} 128}
@@ -139,6 +140,8 @@ GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
139{ 140{
140 internal_update (load); 141 internal_update (load);
141 load->autodecline = autodecline; 142 load->autodecline = autodecline;
143 if (load->autodecline.value == 0)
144 load->autodecline.value = 1;
142} 145}
143 146
144 147