aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-08 23:34:22 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-08 23:36:51 +0200
commit66f1fd2ad9f2a4e3172bd07f6d71bb1321b0dce0 (patch)
treeddd736fe66d7831d725028e8b45baa03c190477e /examples
parentb0f054e600bd07f540ac0a081dd8b5a8cc561617 (diff)
downloadqpdf-66f1fd2ad9f2a4e3172bd07f6d71bb1321b0dce0.tar.zst
Switch user-supplied functions in C API to return int
Diffstat (limited to 'examples')
-rw-r--r--examples/qpdfjob-c-save-attachment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/qpdfjob-c-save-attachment.c b/examples/qpdfjob-c-save-attachment.c
index 6f67e25b..39d1f69a 100644
--- a/examples/qpdfjob-c-save-attachment.c
+++ b/examples/qpdfjob-c-save-attachment.c
@@ -12,11 +12,11 @@
// something with QPDFJob. See qpdfjob-c-save-attachment.c for an
// implementation that uses the C API.
-static void
+static int
save_to_file(char const* data, size_t len, void* udata)
{
FILE* f = (FILE*)udata;
- fwrite(data, 1, len, f);
+ return fwrite(data, 1, len, f) != len;
}
static FILE*