Move them closer to where they are actually used.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_qapi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
index 36b184b226..165ecf1180 100644
--- a/src/qemu/qemu_qapi.c
+++ b/src/qemu/qemu_qapi.c
@@ -243,8 +243,6 @@ virQEMUQAPISchemaTraverseEnum(virJSONValue *cur,
{
const char *query = virQEMUQAPISchemaTraverseContextNextQuery(ctxt);
virJSONValue *values;
- virJSONValue *enumval;
- const char *value;
size_t i;
if (query[0] != '^')
@@ -259,6 +257,9 @@ virQEMUQAPISchemaTraverseEnum(virJSONValue *cur,
return -2;
for (i = 0; i < virJSONValueArraySize(values); i++) {
+ virJSONValue *enumval;
+ const char *value;
+
if (!(enumval = virJSONValueArrayGet(values, i)) ||
!(value = virJSONValueGetString(enumval)))
continue;
--
2.31.1