diff options
Diffstat (limited to 'Bootloaders')
-rw-r--r-- | Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c index cdee1c30c..b54f943b1 100644 --- a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c +++ b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c @@ -921,15 +921,16 @@ void ihex_get_data(int addr, int len, unsigned char *bytes) int printf_verbose(const char *format, ...) { va_list ap; - int r; + int r = 0; va_start(ap, format); if (verbose) { r = vprintf(format, ap); fflush(stdout); - return r; } - return 0; + va_end(ap); + + return r; } void delay(double seconds) @@ -948,6 +949,8 @@ void die(const char *str, ...) va_start(ap, str); vfprintf(stderr, str, ap); fprintf(stderr, "\n"); + va_end(ap); + exit(1); } |