mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
overall: Remove unnecessary g_strdup_printf() calls
Replace g_strdup_printf("%s", value) -> g_strdup(value) to avoid unnecessary string formatting. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
ce315328f8
commit
9038ac0c5c
8 changed files with 8 additions and 11 deletions
|
@ -1386,9 +1386,7 @@ char *qemu_console_get_label(QemuConsole *con)
|
|||
object_get_typename(c->device),
|
||||
c->head);
|
||||
} else {
|
||||
return g_strdup_printf("%s", dev->id ?
|
||||
dev->id :
|
||||
object_get_typename(c->device));
|
||||
return g_strdup(dev->id ? : object_get_typename(c->device));
|
||||
}
|
||||
}
|
||||
return g_strdup("VGA");
|
||||
|
|
3
ui/gtk.c
3
ui/gtk.c
|
@ -1944,8 +1944,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
|
|||
vcd->console = vc;
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "vc%d", idx);
|
||||
vc->label = g_strdup_printf("%s", vc->vte.chr->label
|
||||
? vc->vte.chr->label : buffer);
|
||||
vc->label = g_strdup(vc->vte.chr->label ? : buffer);
|
||||
group = gd_vc_menu_init(s, vc, idx, group, view_menu);
|
||||
|
||||
vc->vte.terminal = vte_terminal_new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue