aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/pci-pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqos/pci-pc.c')
-rw-r--r--tests/libqos/pci-pc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c
index a7803308b7..585f5289ec 100644
--- a/tests/libqos/pci-pc.c
+++ b/tests/libqos/pci-pc.c
@@ -160,14 +160,9 @@ void qpci_free_pc(QPCIBus *bus)
void qpci_unplug_acpi_device_test(const char *id, uint8_t slot)
{
QDict *response;
- char *cmd;
-
- cmd = g_strdup_printf("{'execute': 'device_del',"
- " 'arguments': {"
- " 'id': '%s'"
- "}}", id);
- response = qmp(cmd);
- g_free(cmd);
+
+ response = qmp("{'execute': 'device_del', 'arguments': {'id': %s}}",
+ id);
g_assert(response);
g_assert(!qdict_haskey(response, "error"));
qobject_unref(response);