From: Christian Grothoff Date: Thu, 21 Oct 2010 10:14:13 +0000 (+0000) Subject: allow zero X-Git-Tag: initial-import-from-subversion-38251~20001 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=63267491ed45e12a9b50be5c8b0b32811d95c1e2;p=oweals%2Fgnunet.git allow zero --- 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) { 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; }