summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-02-12 10:11:32 -0800
committerEdward Thomson <ethomson@github.com>2016-02-16 11:50:47 +0000
commit997e0301541e5f3babdd18105f4155d6108d1490 (patch)
treec1cc146c6a5d514bdd1d626e21e93e8744fc1cae
parent9a634cba85747b8b86b5c91c1420aa6688d61180 (diff)
downloadlibgit2-997e0301541e5f3babdd18105f4155d6108d1490.tar.gz
index: don't use `seek` return as an error code
-rw-r--r--src/index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c
index aced53225..98e20e054 100644
--- a/src/index.c
+++ b/src/index.c
@@ -603,14 +603,14 @@ const git_oid *git_index_checksum(git_index *index)
*/
static int compare_checksum(git_index *index)
{
- int fd, error;
+ int fd;
ssize_t bytes_read;
git_oid checksum = {{ 0 }};
if ((fd = p_open(index->index_file_path, O_RDONLY)) < 0)
return fd;
- if ((error = p_lseek(fd, -20, SEEK_END)) < 0) {
+ if (p_lseek(fd, -20, SEEK_END) < 0) {
p_close(fd);
giterr_set(GITERR_OS, "failed to seek to end of file");
return -1;