mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
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>
This commit is contained in:
parent
e9529768d4
commit
f73480c36f
2 changed files with 7 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue