From 49ec5769c9dfdfbaabe939d0851bda95364a05d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 16 Jan 2019 08:47:06 +0100 Subject: [PATCH] qemuBuildControllersCommandLine: use i instead of j as the counter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the nested loop is gone. Signed-off-by: Ján Tomko Reviewed-by: Cole Robinson --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 250a484c40..3e46f3ced3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3208,7 +3208,7 @@ qemuBuildControllersCommandLine(virCommandPtr cmd, const virDomainDef *def, virQEMUCapsPtr qemuCaps) { - size_t j; + size_t i; int contOrder[] = { /* * List of controller types that we add commandline args for, @@ -3237,8 +3237,8 @@ qemuBuildControllersCommandLine(virCommandPtr cmd, }; int ret = -1; - for (j = 0; j < ARRAY_CARDINALITY(contOrder); j++) { - if (qemuBuildControllersByTypeCommandLine(cmd, def, qemuCaps, contOrder[j]) < 0) + for (i = 0; i < ARRAY_CARDINALITY(contOrder); i++) { + if (qemuBuildControllersByTypeCommandLine(cmd, def, qemuCaps, contOrder[i]) < 0) goto cleanup; } -- GitLab