diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-11 21:58:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-11 21:58:28 +0000 |
commit | be537ba3666dee493c43afc5c011c6d1d9b6a23a (patch) | |
tree | 26c06e549bdf9a5c6f984d240158af58928627b8 /src/util/test_time.c | |
parent | 719fb963b47d487112879ff2cb9d10cff88b84f5 (diff) | |
download | gnunet-be537ba3666dee493c43afc5c011c6d1d9b6a23a.tar.gz gnunet-be537ba3666dee493c43afc5c011c6d1d9b6a23a.zip |
use constants instead of casting -1
Diffstat (limited to 'src/util/test_time.c')
-rw-r--r-- | src/util/test_time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/test_time.c b/src/util/test_time.c index ec8d3e9ad..84147ecf9 100644 --- a/src/util/test_time.c +++ b/src/util/test_time.c | |||
@@ -65,7 +65,7 @@ check () | |||
65 | GNUNET_assert (last.value == GNUNET_TIME_UNIT_FOREVER_ABS.value); | 65 | GNUNET_assert (last.value == GNUNET_TIME_UNIT_FOREVER_ABS.value); |
66 | 66 | ||
67 | /* check overflow for r2a */ | 67 | /* check overflow for r2a */ |
68 | rel.value = ((uint64_t) - 1LL) - 1024; | 68 | rel.value = (UINT64_MAX) - 1024; |
69 | GNUNET_log_skip (1, GNUNET_NO); | 69 | GNUNET_log_skip (1, GNUNET_NO); |
70 | last = GNUNET_TIME_relative_to_absolute (rel); | 70 | last = GNUNET_TIME_relative_to_absolute (rel); |
71 | GNUNET_log_skip (0, GNUNET_NO); | 71 | GNUNET_log_skip (0, GNUNET_NO); |
@@ -124,7 +124,7 @@ check () | |||
124 | future = GNUNET_TIME_absolute_add (forever, GNUNET_TIME_UNIT_ZERO); | 124 | future = GNUNET_TIME_absolute_add (forever, GNUNET_TIME_UNIT_ZERO); |
125 | GNUNET_assert (future.value == forever.value); | 125 | GNUNET_assert (future.value == forever.value); |
126 | 126 | ||
127 | rel.value = ((uint64_t) - 1LL) - 1024; | 127 | rel.value = (UINT64_MAX) - 1024; |
128 | now.value = rel.value; | 128 | now.value = rel.value; |
129 | future = GNUNET_TIME_absolute_add (now, rel); | 129 | future = GNUNET_TIME_absolute_add (now, rel); |
130 | GNUNET_assert (future.value == forever.value); | 130 | GNUNET_assert (future.value == forever.value); |