summaryrefslogtreecommitdiff
path: root/src/integer.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-20 13:04:10 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-20 13:04:10 +0000
commitc6d47acfbfd514a12ac9fb14c87a247da7bfbf1d (patch)
treeb764d6d46563d48cd7db31dd7e2005ca1122768e /src/integer.h
parentf04f1c7eedf2081c35dda71594a6072c6cc65694 (diff)
downloadlibgit2-c6d47acfbfd514a12ac9fb14c87a247da7bfbf1d.tar.gz
Remove unused git__add_uint64_overflow
Diffstat (limited to 'src/integer.h')
-rw-r--r--src/integer.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/integer.h b/src/integer.h
index f6642ca23..144a21bd8 100644
--- a/src/integer.h
+++ b/src/integer.h
@@ -42,18 +42,6 @@ GIT_INLINE(int) git__is_int(long long p)
return p == (long long)r;
}
-/**
- * Sets `one + two` into `out`, unless the arithmetic would overflow.
- * @return true if the result fits in a `uint64_t`, false on overflow.
- */
-GIT_INLINE(bool) git__add_uint64_overflow(uint64_t *out, uint64_t one, uint64_t two)
-{
- if (UINT64_MAX - one < two)
- return true;
- *out = one + two;
- return false;
-}
-
/* Use clang/gcc compiler intrinsics whenever possible */
#if (__has_builtin(__builtin_add_overflow) || \
(defined(__GNUC__) && (__GNUC__ >= 5)))