summaryrefslogtreecommitdiff
path: root/src/util/time.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-07-17 23:26:42 +0000
committerChristian Grothoff <christian@grothoff.org>2009-07-17 23:26:42 +0000
commit378329622ec0a18b48da5c220fed73a86a5703ef (patch)
tree59d74920a0c37f7a8412f2e05843aa4f10672221 /src/util/time.c
parent36d3cd5a59063bfc35875fc0a050e869f9da7349 (diff)
downloadgnunet-378329622ec0a18b48da5c220fed73a86a5703ef.tar.gz
gnunet-378329622ec0a18b48da5c220fed73a86a5703ef.zip
test
Diffstat (limited to 'src/util/time.c')
-rw-r--r--src/util/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/time.c b/src/util/time.c
index 95fa89b9a..f1f6010d4 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -95,7 +95,7 @@ struct GNUNET_TIME_Absolute
95GNUNET_TIME_relative_to_absolute (struct GNUNET_TIME_Relative rel) 95GNUNET_TIME_relative_to_absolute (struct GNUNET_TIME_Relative rel)
96{ 96{
97 struct GNUNET_TIME_Absolute ret; 97 struct GNUNET_TIME_Absolute ret;
98 if (rel.value == (uint64_t) - 1LL) 98 if (rel.value == (uint64_t) -1LL)
99 return GNUNET_TIME_absolute_get_forever (); 99 return GNUNET_TIME_absolute_get_forever ();
100 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); 100 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
101 if (rel.value + now.value < rel.value) 101 if (rel.value + now.value < rel.value)
@@ -218,7 +218,7 @@ GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel,
218 struct GNUNET_TIME_Relative ret; 218 struct GNUNET_TIME_Relative ret;
219 if (factor == 0) 219 if (factor == 0)
220 return GNUNET_TIME_relative_get_zero (); 220 return GNUNET_TIME_relative_get_zero ();
221 ret.value = rel.value * factor; 221 ret.value = rel.value * (unsigned long long) factor;
222 if (ret.value / factor != rel.value) 222 if (ret.value / factor != rel.value)
223 { 223 {
224 GNUNET_break (0); 224 GNUNET_break (0);