summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index cbe3d4782..8ccf063d5 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -127,7 +127,7 @@ int git_futils_readbuffer_fd(git_buf *buf, git_file fd, size_t len)
/* p_read loops internally to read len bytes */
read_size = p_read(fd, buf->ptr, len);
- if (read_size < 0) {
+ if (read_size != (ssize_t)len) {
giterr_set(GITERR_OS, "Failed to read descriptor");
return -1;
}