diff options
author | Fabiano Rosas <farosas@suse.de> | 2023-02-08 16:46:54 -0300 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-02-14 09:11:27 +0100 |
commit | ca7d9f5f28770af787e11a0300d6ecb3883cbfaa (patch) | |
tree | 925a215900a191b03046d0daa5f29c036e195881 /tests | |
parent | a2da5e2f306c1120dad66c4f2b8bb4084a225ac2 (diff) |
test/qtest: Fix coding style in device-plug-test.c
We should not mix declarations and statements in QEMU code.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20230208194700.11035-7-farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/device-plug-test.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 5a6afa2b57..4f92617335 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -64,6 +64,7 @@ static void process_device_remove(QTestState *qtest, const char *id) static void test_pci_unplug_request(void) { + QTestState *qtest; const char *arch = qtest_get_arch(); const char *machine_addition = ""; @@ -71,8 +72,8 @@ static void test_pci_unplug_request(void) machine_addition = "-machine pc"; } - QTestState *qtest = qtest_initf("%s -device virtio-mouse-pci,id=dev0", - machine_addition); + qtest = qtest_initf("%s -device virtio-mouse-pci,id=dev0", + machine_addition); process_device_remove(qtest, "dev0"); @@ -94,6 +95,7 @@ static void test_q35_pci_unplug_request(void) static void test_pci_unplug_json_request(void) { + QTestState *qtest; const char *arch = qtest_get_arch(); const char *machine_addition = ""; @@ -101,7 +103,7 @@ static void test_pci_unplug_json_request(void) machine_addition = "-machine pc"; } - QTestState *qtest = qtest_initf( + qtest = qtest_initf( "%s -device \"{'driver': 'virtio-mouse-pci', 'id': 'dev0'}\"", machine_addition); |