From 9ec040b74dec4dd1ee8b61c003f892ada6df9bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 9 Mar 2018 13:02:06 -0500 Subject: [PATCH] bus: simplify name handling Simplify a bit the code by using g_strdup_printf() and store it in a non-const value so casting is no longer needed, and ownership is clearer. Backports commit f73480c36f49562556b80bb5bf8acc45e20dcca1 from qemu --- qemu/include/hw/qdev-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/include/hw/qdev-core.h b/qemu/include/hw/qdev-core.h index 127a8320..ca52771c 100644 --- a/qemu/include/hw/qdev-core.h +++ b/qemu/include/hw/qdev-core.h @@ -202,7 +202,7 @@ typedef struct BusChild { struct BusState { Object obj; DeviceState *parent; - const char *name; + char *name; int max_index; bool realized; QTAILQ_HEAD(ChildrenHead, BusChild) children;