summaryrefslogtreecommitdiff
path: root/src/url.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2019-12-18 10:00:29 +0200
committerTimo Teräs <timo.teras@iki.fi>2019-12-18 10:00:29 +0200
commit6996b1ea7504b1d3c90fbe6a6d4dee162fcff683 (patch)
treef1d94dd7e9e0709d068073c7ab6f5a97c7b8bb5d /src/url.c
parent695a2f8231f11f690ba96d6c4b537e22dd6571fd (diff)
downloadapk-tools-6996b1ea7504b1d3c90fbe6a6d4dee162fcff683.tar.gz
apk-tools-6996b1ea7504b1d3c90fbe6a6d4dee162fcff683.tar.bz2
apk-tools-6996b1ea7504b1d3c90fbe6a6d4dee162fcff683.tar.xz
apk-tools-6996b1ea7504b1d3c90fbe6a6d4dee162fcff683.zip
io: use proper base struct types for method implementations
Diffstat (limited to 'src/url.c')
-rw-r--r--src/url.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/url.c b/src/url.c
index 414a109..cacca81 100644
--- a/src/url.c
+++ b/src/url.c
@@ -67,9 +67,9 @@ static int fetch_maperror(int ec)
return map[ec];
}
-static void fetch_get_meta(void *stream, struct apk_file_meta *meta)
+static void fetch_get_meta(struct apk_istream *is, struct apk_file_meta *meta)
{
- struct apk_fetch_istream *fis = container_of(stream, struct apk_fetch_istream, is);
+ struct apk_fetch_istream *fis = container_of(is, struct apk_fetch_istream, is);
*meta = (struct apk_file_meta) {
.atime = fis->urlstat.atime,
@@ -77,9 +77,9 @@ static void fetch_get_meta(void *stream, struct apk_file_meta *meta)
};
}
-static ssize_t fetch_read(void *stream, void *ptr, size_t size)
+static ssize_t fetch_read(struct apk_istream *is, void *ptr, size_t size)
{
- struct apk_fetch_istream *fis = container_of(stream, struct apk_fetch_istream, is);
+ struct apk_fetch_istream *fis = container_of(is, struct apk_fetch_istream, is);
ssize_t i = 0, r;
if (ptr == NULL) return apk_istream_skip(&fis->is, size);
@@ -94,9 +94,9 @@ static ssize_t fetch_read(void *stream, void *ptr, size_t size)
return i;
}
-static void fetch_close(void *stream)
+static void fetch_close(struct apk_istream *is)
{
- struct apk_fetch_istream *fis = container_of(stream, struct apk_fetch_istream, is);
+ struct apk_fetch_istream *fis = container_of(is, struct apk_fetch_istream, is);
fetchIO_close(fis->fetchIO);
free(fis);