From 63f95e73d6e4c62fbb3fec50e89b3d6522a32937 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 14 Nov 2013 12:43:55 +0000 Subject: [PATCH] -multiply infinity without warning --- src/util/time.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/time.c b/src/util/time.c index 19f3e488f..a61575628 100644 --- a/src/util/time.c +++ b/src/util/time.c @@ -385,6 +385,8 @@ GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel, if (0 == factor) return GNUNET_TIME_UNIT_ZERO; + if (rel.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us) + return GNUNET_TIME_UNIT_FOREVER_REL; ret.rel_value_us = rel.rel_value_us * (unsigned long long) factor; if (ret.rel_value_us / factor != rel.rel_value_us) { -- 2.25.1