commit a8fd04705818b4ebe1d3ce1463857e4a40da247c
parent 8b0d40e694745b10c405580a92dffe586f399ac2
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 7 Nov 2022 10:00:50 +0100
libc/stdio: Remove dead code in vfprintf()
The variable len was asigned to a value that was not used
ever because it was overwritten using the value from strlen().
Diffstat:
1 file changed, 0 insertions(+), 4 deletions(-)
diff --git a/src/libc/stdio/vfprintf.c b/src/libc/stdio/vfprintf.c
@@ -344,10 +344,6 @@ flags:
/* len = wcsnlen(ws, conv.prec); */
goto wstrout;
} else {
- if (conv.prec != -1)
- len = conv.prec;
- else
- len = SIZE_MAX;
s = va_arg(va2, char *);
if ((len = strlen(s)) > conv.prec)
len = conv.prec;