From 49b3a0d2cedd3693d77924fdc0a7719a75bd28da Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 7 Oct 2013 13:22:24 +0000 Subject: minor vfprintf and vfwprintf changes to please static code analyzers add missing va_end and remove some unnecessary code. --- src/stdio/vfwprintf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/stdio/vfwprintf.c') diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c index 3557678f..984ff7b7 100644 --- a/src/stdio/vfwprintf.c +++ b/src/stdio/vfwprintf.c @@ -253,7 +253,6 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ /* Check validity of argument type (nl/normal) */ if (st==NOARG) { if (argpos>=0) return -1; - else if (!f) continue; } else { if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos]; else if (f) pop_arg(&arg, st, ap); @@ -287,8 +286,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ case 'S': a = arg.p; z = wmemchr(a, 0, p); - if (!z) z=a+p; - else p=z-a; + if (z) p=z-a; if (w