From 63bc750fecb00fc5878ca889204fc65510893778 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 11 Jun 2023 23:27:16 +0200 Subject: libio: remove single line wrapper functions Signed-off-by: David Oberhollenzer --- lib/io/test/istream_mem.c | 6 +++--- lib/io/test/sparse_fb.c | 2 +- lib/io/test/xfrm.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/io/test') diff --git a/lib/io/test/istream_mem.c b/lib/io/test/istream_mem.c index a486899..ca5146c 100644 --- a/lib/io/test/istream_mem.c +++ b/lib/io/test/istream_mem.c @@ -45,10 +45,10 @@ int main(int argc, char **argv) TEST_NOT_NULL(in); TEST_EQUAL_UI(((sqfs_object_t *)in)->refcount, 1); - TEST_STR_EQUAL(istream_get_filename(in), "memstream.txt"); + TEST_STR_EQUAL(in->get_filename(in), "memstream.txt"); for (i = 0; i < end2; i += diff) { - ret = istream_get_buffered_data(in, &ptr, &size, 61); + ret = in->get_buffered_data(in, &ptr, &size, 61); TEST_EQUAL_I(ret, 0); if ((end2 - i) >= 61) { @@ -65,7 +65,7 @@ int main(int argc, char **argv) diff = eat_all ? size : (size / 2); eat_all = !eat_all; - istream_advance_buffer(in, diff); + in->advance_buffer(in, diff); } sqfs_drop(in); diff --git a/lib/io/test/sparse_fb.c b/lib/io/test/sparse_fb.c index fa4b840..5ee6004 100644 --- a/lib/io/test/sparse_fb.c +++ b/lib/io/test/sparse_fb.c @@ -58,7 +58,7 @@ int main(int argc, char **argv) ret = ostream_append_sparse(&dummy, ref); TEST_EQUAL_I(ret, 0); - ret = ostream_flush(&dummy); + ret = dummy.flush(&dummy); TEST_EQUAL_I(ret, 0); TEST_EQUAL_UI(ref, total); diff --git a/lib/io/test/xfrm.c b/lib/io/test/xfrm.c index 323987c..c2e450c 100644 --- a/lib/io/test/xfrm.c +++ b/lib/io/test/xfrm.c @@ -469,11 +469,11 @@ static void run_pack_test(void) TEST_EQUAL_UI(((sqfs_object_t *)&mem_ostream)->refcount, 2); for (i = 0; i < (sizeof(orig) - 1); ++i) { - ret = ostream_append(ostream, orig + i, 1); + ret = ostream->append(ostream, orig + i, 1); TEST_EQUAL_I(ret, 0); } - ret = ostream_flush(ostream); + ret = ostream->flush(ostream); TEST_EQUAL_I(ret, 0); TEST_ASSERT(mo_flushed); -- cgit v1.2.3