summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-20 13:52:46 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-20 13:52:46 +0000
commit75444d97fd5bc13be922714f2977a483c5303286 (patch)
tree23ebea01bc056e03be6c1afc1b464b4f3bc3830d
parentabbc07f12fdf1444c8aa0c161f3dfa8a494b7dff (diff)
downloadlibgit2-ethomson/fix-intrinsics.tar.gz
add with overflow: correct documentationethomson/fix-intrinsics
Correct the documentation on the fallback add/multiply with overflow functions.
-rw-r--r--src/integer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/integer.h b/src/integer.h
index 12e71f76a..10b109737 100644
--- a/src/integer.h
+++ b/src/integer.h
@@ -79,7 +79,7 @@ GIT_INLINE(int) git__is_int(long long p)
/**
* Sets `one + two` into `out`, unless the arithmetic would overflow.
- * @return true if the result fits in a `size_t`, false on overflow.
+ * @return false if the result fits in a `size_t`, true on overflow.
*/
GIT_INLINE(bool) git__add_sizet_overflow(size_t *out, size_t one, size_t two)
{
@@ -91,7 +91,7 @@ GIT_INLINE(bool) git__add_sizet_overflow(size_t *out, size_t one, size_t two)
/**
* Sets `one * two` into `out`, unless the arithmetic would overflow.
- * @return true if the result fits in a `size_t`, false on overflow.
+ * @return false if the result fits in a `size_t`, true on overflow.
*/
GIT_INLINE(bool) git__multiply_sizet_overflow(size_t *out, size_t one, size_t two)
{