summaryrefslogtreecommitdiff
path: root/src/apk_io.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-10-05 18:52:51 +0300
committerTimo Teräs <timo.teras@iki.fi>2020-10-09 16:09:19 +0300
commit354713d2f746c197eed6a1feb4c6af3420af6c15 (patch)
treef9dd51bbdde0f25f8e122832cf006076b8452d28 /src/apk_io.h
parent7a7eca86709fcf31dbb1acf8b82ff411828fb67b (diff)
downloadapk-tools-354713d2f746c197eed6a1feb4c6af3420af6c15.tar.gz
apk-tools-354713d2f746c197eed6a1feb4c6af3420af6c15.tar.bz2
apk-tools-354713d2f746c197eed6a1feb4c6af3420af6c15.tar.xz
apk-tools-354713d2f746c197eed6a1feb4c6af3420af6c15.zip
rename apk_db_options to apk_ctx, rework logging
makes apk_verbosity non-global fixes #10682
Diffstat (limited to 'src/apk_io.h')
-rw-r--r--src/apk_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_io.h b/src/apk_io.h
index 2e70b53..adec003 100644
--- a/src/apk_io.h
+++ b/src/apk_io.h
@@ -147,7 +147,7 @@ struct apk_ostream *apk_ostream_to_fd(int fd);
struct apk_ostream *apk_ostream_to_file(int atfd, const char *file, mode_t mode);
struct apk_ostream *apk_ostream_to_file_gz(int atfd, const char *file, const char *tmpfile, mode_t mode);
size_t apk_ostream_write_string(struct apk_ostream *ostream, const char *string);
-static inline void apk_ostream_cancel(struct apk_ostream *os, int rc) { if (!os->rc) os->rc = rc; }
+static inline int apk_ostream_cancel(struct apk_ostream *os, int rc) { if (!os->rc) os->rc = rc; return rc; }
static inline ssize_t apk_ostream_write(struct apk_ostream *os, const void *buf, size_t size)
{
return os->ops->write(os, buf, size);