Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c6d47acf
Commit
c6d47acf
authored
Jan 20, 2019
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused git__add_uint64_overflow
parent
f04f1c7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
12 deletions
+0
-12
src/integer.h
+0
-12
No files found.
src/integer.h
View file @
c6d47acf
...
@@ -42,18 +42,6 @@ GIT_INLINE(int) git__is_int(long long p)
...
@@ -42,18 +42,6 @@ GIT_INLINE(int) git__is_int(long long p)
return
p
==
(
long
long
)
r
;
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 */
/* Use clang/gcc compiler intrinsics whenever possible */
#if (__has_builtin(__builtin_add_overflow) || \
#if (__has_builtin(__builtin_add_overflow) || \
(defined(__GNUC__) && (__GNUC__ >= 5)))
(defined(__GNUC__) && (__GNUC__ >= 5)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment