libxc: initalize stdio loggers' progress_last_percent values to 0
authorMatthew Daley <mattjd@gmail.com>
Wed, 30 Oct 2013 07:51:46 +0000 (20:51 +1300)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 31 Oct 2013 21:55:51 +0000 (21:55 +0000)
...otherwise they are undefined in the first progress callback.

Coverity-ID: 1056055
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xtl_logger_stdio.c

index 2e73c862b98763caced1a72360f2dcf821953d25..aa5501f98fe986a7d1241217d7b9f8e43ba3e548 100644 (file)
@@ -172,6 +172,7 @@ xentoollog_logger_stdiostream *xtl_createlogger_stdiostream
     if (newlogger.flags & XTL_STDIOSTREAM_SHOW_DATE) tzset();
 
     newlogger.progress_erase_len = 0;
+    newlogger.progress_last_percent = 0;
 
     return XTL_NEW_LOGGER(stdiostream, newlogger);
 }