Skip to content

Commit c6d47ac

Browse files
committed
Remove unused git__add_uint64_overflow
1 parent f04f1c7 commit c6d47ac

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/integer.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ GIT_INLINE(int) git__is_int(long long p)
4242
return p == (long long)r;
4343
}
4444

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-
5745
/* Use clang/gcc compiler intrinsics whenever possible */
5846
#if (__has_builtin(__builtin_add_overflow) || \
5947
(defined(__GNUC__) && (__GNUC__ >= 5)))

0 commit comments

Comments
 (0)