Commit 75444d97 by Edward Thomson

add with overflow: correct documentation

Correct the documentation on the fallback add/multiply with overflow
functions.
parent abbc07f1
...@@ -79,7 +79,7 @@ GIT_INLINE(int) git__is_int(long long p) ...@@ -79,7 +79,7 @@ GIT_INLINE(int) git__is_int(long long p)
/** /**
* Sets `one + two` into `out`, unless the arithmetic would overflow. * 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) 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) ...@@ -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. * 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) GIT_INLINE(bool) git__multiply_sizet_overflow(size_t *out, size_t one, size_t two)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment