summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/repository.c b/src/repository.c
index 5871e9567..14968d75d 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2545,7 +2545,7 @@ int git_repository_hashfile(
int error;
git_filter_list *fl = NULL;
git_file fd = -1;
- git_off_t len;
+ uint64_t len;
git_buf full_path = GIT_BUF_INIT;
assert(out && path && repo); /* as_path can be NULL */
@@ -2582,11 +2582,8 @@ int git_repository_hashfile(
goto cleanup;
}
- len = git_futils_filesize(fd);
- if (len < 0) {
- error = (int)len;
+ if ((error = git_futils_filesize(&len, fd)) < 0)
goto cleanup;
- }
if (!git__is_sizet(len)) {
git_error_set(GIT_ERROR_OS, "file size overflow for 32-bit systems");