error-report: use error_printf() for program prefix
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 23 Mar 2022 15:57:26 +0000 (19:57 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:31:43 +0000 (14:31 +0200)
For consistency with other calls in the function, let's use
error_printf(). (it will use stderr since !monitor_cur())

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220323155743.1585078-16-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/error-report.c

index 71ce3ee700fc6d8bf8dfec4ce4e83a2c68daaa36..d9d3ac30cfabf992fe587cda6cb40c2cf1473da4 100644 (file)
@@ -156,7 +156,7 @@ static void print_loc(void)
     const char *const *argp;
 
     if (!monitor_cur() && g_get_prgname()) {
-        fprintf(stderr, "%s:", g_get_prgname());
+        error_printf("%s:", g_get_prgname());
         sep = " ";
     }
     switch (cur_loc->kind) {