From a01f1fe66f44ffdbe2f15c2b2e850c2708f6ae5d Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 21 Feb 2020 23:44:20 -0500 Subject: remove wrap_write helper from vdprintf this reverts commit 4ee039f3545976f9e3e25a7e5d7b58f1f2316dc3, which added the helper as a hack to make vdprintf usable before relocation, contingent on strong assumptions about the arch and tooling, back when the dynamic linker did not have a real staged model for self-relocation. since commit f3ddd173806fd5c60b3f034528ca24542aecc5b9 this has been unnecessary and the function was just wasting size and execution time. --- src/stdio/vdprintf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/stdio/vdprintf.c b/src/stdio/vdprintf.c index c35d9b4f..3b9c093b 100644 --- a/src/stdio/vdprintf.c +++ b/src/stdio/vdprintf.c @@ -1,14 +1,9 @@ #include "stdio_impl.h" -static size_t wrap_write(FILE *f, const unsigned char *buf, size_t len) -{ - return __stdio_write(f, buf, len); -} - int vdprintf(int fd, const char *restrict fmt, va_list ap) { FILE f = { - .fd = fd, .lbf = EOF, .write = wrap_write, + .fd = fd, .lbf = EOF, .write = __stdio_write, .buf = (void *)fmt, .buf_size = 0, .lock = -1 }; -- cgit v1.2.1