From 05237ee559486ae4416f3d12e4a422bd9183f7ea Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 23 Jun 2019 17:20:17 +0100 Subject: integer: use int64_t's for checks Use int64_t internally for type visibility. --- src/integer.h | 8 ++++---- 1 file 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 */ -- cgit v1.2.1