From: Jihye Won Date: Fri, 28 Aug 2015 07:47:31 +0000 (+0900) Subject: error: fix a bug about argument pointer variables. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4575666bbe6909d6d725f43b8ee64169200856c4;p=sdk%2Femulator%2Fqemu.git error: fix a bug about argument pointer variables. There was the bug after using vfprintf(). for reusing va_list arguments, va_copy should be invoked. Change-Id: I34abdbb5069ba9c18915871537883eb6cb7a5a9c Signed-off-by: Jihye Won --- diff --git a/tizen/src/util/error_handler.c b/tizen/src/util/error_handler.c index acf77604fe..027a14763e 100644 --- a/tizen/src/util/error_handler.c +++ b/tizen/src/util/error_handler.c @@ -289,7 +289,6 @@ static void report(const char *fmt, va_list ap) // We are wating for '\n' if (message[message_len - 1] == '\n') { - fprintf(stderr, "%s", message); #ifdef CONFIG_QT if (display_type == DT_MARU_QT_ONSCREEN || display_type == DT_MARU_QT_OFFSCREEN) { diff --git a/util/qemu-error.c b/util/qemu-error.c index abab065500..a767dc72d3 100644 --- a/util/qemu-error.c +++ b/util/qemu-error.c @@ -43,9 +43,14 @@ void error_vprintf(const char *fmt, va_list ap) if (cur_mon && !monitor_cur_is_qmp()) { monitor_vprintf(cur_mon, fmt, ap); } else { - vfprintf(stderr, fmt, ap); #ifdef CONFIG_MARU + va_list ap_copy; + va_copy(ap_copy, ap); + vfprintf(stderr, fmt, ap_copy); + va_end(ap_copy); report_to_clients(fmt, ap); +#else + vfprintf(stderr, fmt, ap); #endif } }