X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2FxyzModem.c;h=830fca8387536f372f9988fe7f9ee2b6f0c6acc3;hb=1a7414f6268060c56c72fd7559782137cc953c96;hp=a0c5dfeece505ad07f9973ee7706fb2451ee02b4;hpb=b09ece0836e0267b86f37defec267aa3806cb03a;p=u-boot diff --git a/common/xyzModem.c b/common/xyzModem.c index a0c5dfeece..830fca8387 100644 --- a/common/xyzModem.c +++ b/common/xyzModem.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: eCos-2.0 /* *========================================================================== * @@ -6,8 +7,6 @@ * RedBoot stream handler for xyzModem protocol * *========================================================================== - * SPDX-License-Identifier: eCos-2.0 - *========================================================================== *#####DESCRIPTIONBEGIN#### * * Author(s): gthomas @@ -172,7 +171,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim) } -#ifdef DEBUG +#if defined(DEBUG) && !defined(CONFIG_USE_TINY_PRINTF) /* * Note: this debug setup works by storing the strings in a fixed buffer */ @@ -181,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