aboutsummaryrefslogtreecommitdiff
path: root/lib/io
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-02-20 13:46:12 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-02-20 13:46:12 +0100
commit91df00a92543a45a4916cbaeecbbf70bfa946b78 (patch)
treefe7da4b37b97bd61c677c322e9fe171f59bdddac /lib/io
parent8bb081ad46bc9ce4387f8efed2d0f13690b4c143 (diff)
Remove ostream_printf
By cobbling together the xattr lines manually in libtar, the need (and thus the function itself) are removed. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/io')
-rw-r--r--lib/io/Makemodule.am2
-rw-r--r--lib/io/src/printf.c30
2 files changed, 1 insertions, 31 deletions
diff --git a/lib/io/Makemodule.am b/lib/io/Makemodule.am
index b795788..71f01e8 100644
--- a/lib/io/Makemodule.am
+++ b/lib/io/Makemodule.am
@@ -1,6 +1,6 @@
libio_a_SOURCES = include/io/istream.h include/io/ostream.h include/io/xfrm.h \
include/io/file.h include/io/std.h \
- lib/io/src/internal.h lib/io/src/ostream.c lib/io/src/printf.c \
+ lib/io/src/internal.h lib/io/src/ostream.c \
lib/io/src/istream.c lib/io/src/get_line.c lib/io/src/xfrm/ostream.c \
lib/io/src/xfrm/istream.c
libio_a_CFLAGS = $(AM_CFLAGS) $(ZLIB_CFLAGS) $(XZ_CFLAGS)
diff --git a/lib/io/src/printf.c b/lib/io/src/printf.c
deleted file mode 100644
index 3850487..0000000
--- a/lib/io/src/printf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* SPDX-License-Identifier: GPL-3.0-or-later */
-/*
- * printf.c
- *
- * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
- */
-#include "internal.h"
-
-int ostream_printf(ostream_t *strm, const char *fmt, ...)
-{
- char *temp = NULL;
- va_list ap;
- int ret;
-
- va_start(ap, fmt);
-
- ret = vasprintf(&temp, fmt, ap);
- if (ret < 0)
- perror(strm->get_filename(strm));
- va_end(ap);
-
- if (ret < 0)
- return -1;
-
- if (strm->append(strm, temp, ret))
- ret = -1;
-
- free(temp);
- return ret;
-}