diff options
author | David Robillard <d@drobilla.net> | 2018-06-15 09:26:17 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9 (patch) | |
tree | 70a49bcc4d79d83d0f80f115da457514e09977d0 /test/test_writer.c | |
parent | fe0b6d5d4d78cb31e1bf2381198890d070e46ed1 (diff) | |
download | serd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.tar.gz serd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.tar.bz2 serd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.zip |
Bring read/write interface closer to the C standard
Diffstat (limited to 'test/test_writer.c')
-rw-r--r-- | test/test_writer.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/test_writer.c b/test/test_writer.c index 76d046d7..0c78495e 100644 --- a/test/test_writer.c +++ b/test/test_writer.c @@ -77,12 +77,15 @@ test_write_long_literal(void) } static size_t -null_sink(const void* const buf, const size_t len, void* const stream) +null_sink(const void* const buf, + const size_t size, + const size_t nmemb, + void* const stream) { (void)buf; (void)stream; - return len; + return size * nmemb; } static void @@ -167,9 +170,13 @@ test_strict_write(void) // Produce a write error without setting errno static size_t -error_sink(const void* const buf, const size_t len, void* const stream) +error_sink(const void* const buf, + const size_t size, + const size_t len, + void* const stream) { (void)buf; + (void)size; (void)len; (void)stream; return 0U; |