aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-26 12:27:28 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-26 12:27:28 +0000
commit65a922f1144a89ad9aa95a29899fc3338ad8a35a (patch)
treef39ae23be05b5da4ba0b122904aa1d35a481f753 /src/include
parent874f5684e15a99d6ed4316088d33dca55f484c33 (diff)
downloadgnunet-65a922f1144a89ad9aa95a29899fc3338ad8a35a.tar.gz
gnunet-65a922f1144a89ad9aa95a29899fc3338ad8a35a.zip
change time multiplication/division API to long long to avoid accidental range reduction
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_bandwidth_lib.h4
-rw-r--r--src/include/gnunet_time_lib.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h
index 7b63de390..178ddaaac 100644
--- a/src/include/gnunet_bandwidth_lib.h
+++ b/src/include/gnunet_bandwidth_lib.h
@@ -126,7 +126,7 @@ struct GNUNET_BANDWIDTH_Tracker
126 struct GNUNET_TIME_Absolute last_update__; 126 struct GNUNET_TIME_Absolute last_update__;
127 127
128 /** 128 /**
129 * Bandwidth limit to enforce in bytes per s. 129 * Bandwidth limit to enforce in bytes per second.
130 */ 130 */
131 uint32_t available_bytes_per_s__; 131 uint32_t available_bytes_per_s__;
132 132
@@ -289,7 +289,7 @@ GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
289 289
290 290
291/** 291/**
292 * Compute how long we should wait until consuming 'size' 292 * Compute how long we should wait until consuming @a size
293 * bytes of bandwidth in order to stay within the given 293 * bytes of bandwidth in order to stay within the given
294 * quota. 294 * quota.
295 * 295 *
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index 3dad179b5..64c5769c6 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -417,7 +417,7 @@ GNUNET_TIME_absolute_subtract (struct GNUNET_TIME_Absolute start,
417 */ 417 */
418struct GNUNET_TIME_Relative 418struct GNUNET_TIME_Relative
419GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel, 419GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel,
420 unsigned int factor); 420 unsigned long long factor);
421 421
422 422
423/** 423/**
@@ -429,7 +429,7 @@ GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel,
429 */ 429 */
430struct GNUNET_TIME_Relative 430struct GNUNET_TIME_Relative
431GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel, 431GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel,
432 unsigned int factor); 432 unsigned long long factor);
433 433
434 434
435/** 435/**