Browse Source

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.
Rich Felker 5 years ago
parent
commit
a01f1fe66f
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/stdio/vdprintf.c

+ 1 - 6
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
 	};