[U-Boot] [PATCH 1/1] xyz-modem: va_start() must be matched by va_end()

Heinrich Schuchardt xypron.glpk at gmx.de
Mon May 7 19:59:34 UTC 2018


Every va_start() call must be matched by a va_end() call.

scripts/checkpatch.pl required reformatting the complete function
zm_dprintf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 common/xyzModem.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/common/xyzModem.c b/common/xyzModem.c
index a126e32ed35..2b18a6e9f50 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -180,15 +180,16 @@ static char *zm_out = zm_debug_buf;
 static char *zm_out_start = zm_debug_buf;
 
 static int
-zm_dprintf (char *fmt, ...)
+zm_dprintf(char *fmt, ...)
 {
-  int len;
-  va_list args;
-
-  va_start (args, fmt);
-  len = diag_vsprintf (zm_out, fmt, args);
-  zm_out += len;
-  return len;
+	int len;
+	va_list args;
+
+	va_start(args, fmt);
+	len = diag_vsprintf(zm_out, fmt, args);
+	va_end(args);
+	zm_out += len;
+	return len;
 }
 
 static void
-- 
2.17.0



More information about the U-Boot mailing list