From 75444d97fd5bc13be922714f2977a483c5303286 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 20 Jan 2019 13:52:46 +0000 Subject: add with overflow: correct documentation Correct the documentation on the fallback add/multiply with overflow functions. --- src/integer.h | 4 ++-- 1 file 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) { -- cgit v1.2.1