diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-23 17:20:17 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-10-28 11:02:01 +0000 |
commit | 93125b153630e13af03516a2ba55e76d09c20f57 (patch) | |
tree | 9349f4c7154b9a6c0030ece967581a9eeeac8125 | |
parent | 9406382b2e1b1df3432b5ebde4b8ec258672aa32 (diff) | |
download | libgit2-93125b153630e13af03516a2ba55e76d09c20f57.tar.gz |
integer: use off64_t's for checks
-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 4738e9e35..eef291d5c 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 */ |