From: Christian Grothoff Date: Thu, 14 Nov 2013 12:43:55 +0000 (+0000) Subject: -multiply infinity without warning X-Git-Tag: initial-import-from-subversion-38251~6114 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=63f95e73d6e4c62fbb3fec50e89b3d6522a32937;p=oweals%2Fgnunet.git -multiply infinity without warning --- 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) {