From: Matthew Daley Date: Wed, 30 Oct 2013 07:51:46 +0000 (+1300) Subject: libxc: initalize stdio loggers' progress_last_percent values to 0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6104 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=492da27a3edd9064937007d5d373ffc4f9bc6ff5;p=xen.git libxc: initalize stdio loggers' progress_last_percent values to 0 ...otherwise they are undefined in the first progress callback. Coverity-ID: 1056055 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxc/xtl_logger_stdio.c b/tools/libxc/xtl_logger_stdio.c index 2e73c862b9..aa5501f98f 100644 --- a/tools/libxc/xtl_logger_stdio.c +++ b/tools/libxc/xtl_logger_stdio.c @@ -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); }