We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f04f1c7 commit c6d47acCopy full SHA for c6d47ac
src/integer.h
@@ -42,18 +42,6 @@ GIT_INLINE(int) git__is_int(long long p)
42
return p == (long long)r;
43
}
44
45
-/**
46
- * Sets `one + two` into `out`, unless the arithmetic would overflow.
47
- * @return true if the result fits in a `uint64_t`, false on overflow.
48
- */
49
-GIT_INLINE(bool) git__add_uint64_overflow(uint64_t *out, uint64_t one, uint64_t two)
50
-{
51
- if (UINT64_MAX - one < two)
52
- return true;
53
- *out = one + two;
54
- return false;
55
-}
56
-
57
/* Use clang/gcc compiler intrinsics whenever possible */
58
#if (__has_builtin(__builtin_add_overflow) || \
59
(defined(__GNUC__) && (__GNUC__ >= 5)))
0 commit comments