From 543202c0ddbcc4ee97d82fe45356e1ab00093f90 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 17 Dec 2015 17:35:14 +0100 Subject: error: Don't append a newline when printing the error hint Since commit 50b7b00, we have error_append_hint() to conveniently accumulate Error member @hint. error_report_err() prints it with a newline appended. Consequently, users of error_append_hint() need to know whether theirs is the final line of the hint to decide whether it needs a newline. Not a nice interface. Change error_report_err() to print just the hint, and the (still few) users of error_append_hint() to add the required newline. Cc: Eric Blake Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1450370121-5768-7-git-send-email-armbru@redhat.com> --- util/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/error.c') diff --git a/util/error.c b/util/error.c index 80c89a2079..9b27c4508e 100644 --- a/util/error.c +++ b/util/error.c @@ -204,7 +204,7 @@ void error_report_err(Error *err) { error_report("%s", error_get_pretty(err)); if (err->hint) { - error_printf_unless_qmp("%s\n", err->hint->str); + error_printf_unless_qmp("%s", err->hint->str); } error_free(err); } -- cgit v1.2.3