From 63267491ed45e12a9b50be5c8b0b32811d95c1e2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 21 Oct 2010 10:14:13 +0000 Subject: [PATCH] allow zero --- src/util/load.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.25.1