From f73480c36f49562556b80bb5bf8acc45e20dcca1 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 15 Jul 2016 12:04:49 +0200 Subject: 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. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- include/hw/qdev-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/qdev-core.h') diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 4b4b33bec8..2c973473f7 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -224,7 +224,7 @@ typedef struct BusChild { struct BusState { Object obj; DeviceState *parent; - const char *name; + char *name; HotplugHandler *hotplug_handler; int max_index; bool realized; -- cgit v1.2.3-55-g7522