[PATCH v2 19/23] testQemuInfoSetArgs: Move argument fetching to the loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since the last patch removed the hack which needed lookahead to see
whether all QEMU_CAPS_ were parsed we can move the fetching of the
arguments into the loop.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/testutilsqemu.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index c86f7f2e39..5ff373e954 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -697,8 +697,7 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
         abort();

     va_start(argptr, capslatest);
-    argname = va_arg(argptr, testQemuInfoArgName);
-    while (argname != ARG_END) {
+    while ((argname = va_arg(argptr, testQemuInfoArgName)) != ARG_END) {
         switch (argname) {
         case ARG_QEMU_CAPS:
             fakeCapsUsed = true;
@@ -740,8 +739,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
             fprintf(stderr, "Unexpected test info argument");
             goto cleanup;
         }
-
-        argname = va_arg(argptr, testQemuInfoArgName);
     }

     if (!!capsarch ^ !!capsver) {
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux