summaryrefslogtreecommitdiffstats
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorMarc-André Lureau2016-07-15 12:04:49 +0200
committerMarc-André Lureau2016-09-08 16:05:22 +0200
commitf73480c36f49562556b80bb5bf8acc45e20dcca1 (patch)
tree9d102ca71a9ba4abb14c01b3ce7a9fd2098b74b1 /include/hw/qdev-core.h
parentipmi: free extern timer (diff)
downloadqemu-f73480c36f49562556b80bb5bf8acc45e20dcca1.tar.gz
qemu-f73480c36f49562556b80bb5bf8acc45e20dcca1.tar.xz
qemu-f73480c36f49562556b80bb5bf8acc45e20dcca1.zip
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 <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h2
1 files changed, 1 insertions, 1 deletions
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;