summaryrefslogtreecommitdiff
path: root/src/apk_io.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-10-12 13:35:46 +0300
committerTimo Teräs <timo.teras@iki.fi>2017-10-12 13:35:46 +0300
commit2f3c8420493a731556909eb3ebd6d50478fb7b24 (patch)
tree36f5eb9e94b4b72b4a1faca8d059b86d987ac9f9 /src/apk_io.h
parent97e4d0531f2633b54996fc08447bb46449f4a45a (diff)
downloadapk-tools-2f3c8420493a731556909eb3ebd6d50478fb7b24.tar.gz
apk-tools-2f3c8420493a731556909eb3ebd6d50478fb7b24.tar.bz2
apk-tools-2f3c8420493a731556909eb3ebd6d50478fb7b24.tar.xz
apk-tools-2f3c8420493a731556909eb3ebd6d50478fb7b24.zip
io: fix skip and splice to detect unexpected end-of-file
Diffstat (limited to 'src/apk_io.h')
-rw-r--r--src/apk_io.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/apk_io.h b/src/apk_io.h
index b07035c..48bae5f 100644
--- a/src/apk_io.h
+++ b/src/apk_io.h
@@ -108,11 +108,11 @@ struct apk_istream *apk_istream_from_file(int atfd, const char *file);
struct apk_istream *apk_istream_from_file_gz(int atfd, const char *file);
struct apk_istream *apk_istream_from_fd_url_if_modified(int atfd, const char *url, time_t since);
struct apk_istream *apk_istream_from_url_gz(const char *url);
-size_t apk_istream_skip(struct apk_istream *istream, size_t size);
+ssize_t apk_istream_skip(struct apk_istream *istream, size_t size);
#define APK_SPLICE_ALL 0xffffffff
-size_t apk_istream_splice(void *stream, int fd, size_t size,
- apk_progress_cb cb, void *cb_ctx);
+ssize_t apk_istream_splice(void *stream, int fd, size_t size,
+ apk_progress_cb cb, void *cb_ctx);
static inline struct apk_istream *apk_istream_from_fd(int fd)
{