summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/archive.c b/src/archive.c
index 7c26502..af0055e 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -225,10 +225,10 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
}
/* Check that there was no partial record */
- if (r != 0)
- return -1;
+ if (r > 0)
+ r = -1;
- return 0;
+ return r;
err:
EVP_MD_CTX_cleanup(&teis.mdctx);