aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-14 12:43:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-14 12:43:55 +0000
commit63f95e73d6e4c62fbb3fec50e89b3d6522a32937 (patch)
tree086548170e73665dfd8017ee83df202d07cc12a7 /src/util/time.c
parentfceea8076488d3da8d52aaf4ccd966eac57b2734 (diff)
downloadgnunet-63f95e73d6e4c62fbb3fec50e89b3d6522a32937.tar.gz
gnunet-63f95e73d6e4c62fbb3fec50e89b3d6522a32937.zip
-multiply infinity without warning
Diffstat (limited to 'src/util/time.c')
-rw-r--r--src/util/time.c2
1 files changed, 2 insertions, 0 deletions
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,
385 385
386 if (0 == factor) 386 if (0 == factor)
387 return GNUNET_TIME_UNIT_ZERO; 387 return GNUNET_TIME_UNIT_ZERO;
388 if (rel.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
389 return GNUNET_TIME_UNIT_FOREVER_REL;
388 ret.rel_value_us = rel.rel_value_us * (unsigned long long) factor; 390 ret.rel_value_us = rel.rel_value_us * (unsigned long long) factor;
389 if (ret.rel_value_us / factor != rel.rel_value_us) 391 if (ret.rel_value_us / factor != rel.rel_value_us)
390 { 392 {