On Tue, Jun 03, 2014 at 06:52:51PM -0700, enh wrote:
> yeah, the vfwprintf.c PRINT calls __xfputwc which constructs its own
> uio/iov. i think the locals in the caller are just left-over cruft.

That's right. I overlooked these.

We can also remove the NIOV macro.

Index: stdio/vfwprintf.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/vfwprintf.c,v
retrieving revision 1.10
diff -u -p -r1.10 vfwprintf.c
--- stdio/vfwprintf.c   3 May 2014 12:36:45 -0000       1.10
+++ stdio/vfwprintf.c   4 Jun 2014 05:00:54 -0000
@@ -324,9 +324,6 @@ __vfwprintf(FILE * __restrict fp, const 
        int realsz;             /* field size expanded by dprec */
        int size;               /* size of converted field or string */
        const char *xdigs;      /* digits for %[xX] conversion */
-#define NIOV 8
-       struct __suio uio;      /* output information: summary */
-       struct __siov iov[NIOV];/* ... and individual io vectors */
        wchar_t buf[BUF];       /* buffer with space for digits of uintmax_t */
        wchar_t ox[2];          /* space for 0x; ox[1] is either x, X, or \0 */
        union arg *argtable;    /* args, built due to positional arg */
@@ -463,9 +460,6 @@ __vfwprintf(FILE * __restrict fp, const 
        argtable = NULL;
        nextarg = 1;
        va_copy(orgap, ap);
-       uio.uio_iov = iov;
-       uio.uio_resid = 0;
-       uio.uio_iovcnt = 0;
        ret = 0;
        convbuf = NULL;
 

Reply via email to