X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2FxyzModem.c;h=6bf2375671d2825668457472e29c9e81a12fef28;hb=a595a0e910960ccd4611719d5fb5c279859efaee;hp=a126e32ed35e61b50a350074cc6ffe1f3276000e;hpb=83d290c56fab2d38cd1ab4c4cc7099559c1d5046;p=oweals%2Fu-boot.git diff --git a/common/xyzModem.c b/common/xyzModem.c index a126e32ed3..6bf2375671 100644 --- a/common/xyzModem.c +++ b/common/xyzModem.c @@ -24,7 +24,8 @@ #include #include #include -#include +#include +#include /* Assumption - run xyzModem protocol over the console port */ @@ -63,6 +64,7 @@ CYGACC_COMM_IF_GETC_TIMEOUT (char chan, char *c) { ulong now = get_timer(0); + WATCHDOG_RESET(); while (!tstc ()) { if (get_timer(now) > xyzModem_CHAR_TIMEOUT) @@ -171,7 +173,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim) } -#ifdef DEBUG +#if defined(DEBUG) && !CONFIG_IS_ENABLED(USE_TINY_PRINTF) /* * Note: this debug setup works by storing the strings in a fixed buffer */ @@ -180,15 +182,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