Fix additional missing va_end() in the HID bootloader CLI utility.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 22 Dec 2015 11:28:09 +0000 (22:28 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 22 Dec 2015 11:28:09 +0000 (22:28 +1100)
Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c

index 4c32776..b54f943 100644 (file)
@@ -921,17 +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;
        }
        va_end(ap);
 
-       return 0;
+       return r;
 }
 
 void delay(double seconds)