diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-23 17:20:17 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-11-25 13:18:29 +1100 |
commit | 05237ee559486ae4416f3d12e4a422bd9183f7ea (patch) | |
tree | e193dedcf9f3dbd819b9a968f3453a8eaca9bb35 | |
parent | ee0c861816c0e52d6018d8a4ec63914bbb75a712 (diff) | |
download | libgit2-05237ee559486ae4416f3d12e4a422bd9183f7ea.tar.gz |
integer: use int64_t's for checks
Use int64_t internally for type visibility.
-rw-r--r-- | src/integer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/integer.h b/src/integer.h index e024a86d3..067c0be1f 100644 --- a/src/integer.h +++ b/src/integer.h @@ -8,10 +8,10 @@ #define INCLUDE_integer_h__ /** @return true if p fits into the range of a size_t */ -GIT_INLINE(int) git__is_sizet(git_off_t p) +GIT_INLINE(int) git__is_sizet(int64_t p) { size_t r = (size_t)p; - return p == (git_off_t)r; + return p == (int64_t)r; } /** @return true if p fits into the range of an ssize_t */ @@ -36,10 +36,10 @@ GIT_INLINE(int) git__is_uint32(size_t p) } /** @return true if p fits into the range of an unsigned long */ -GIT_INLINE(int) git__is_ulong(git_off_t p) +GIT_INLINE(int) git__is_ulong(int64_t p) { unsigned long r = (unsigned long)p; - return p == (git_off_t)r; + return p == (int64_t)r; } /** @return true if p fits into the range of an int */ |