mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
testQemuInfoSetArgs: Move argument fetching to the loop
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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6545a23277
commit
0ceb802ad9
@ -697,8 +697,7 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
|||||||
abort();
|
abort();
|
||||||
|
|
||||||
va_start(argptr, capslatest);
|
va_start(argptr, capslatest);
|
||||||
argname = va_arg(argptr, testQemuInfoArgName);
|
while ((argname = va_arg(argptr, testQemuInfoArgName)) != ARG_END) {
|
||||||
while (argname != ARG_END) {
|
|
||||||
switch (argname) {
|
switch (argname) {
|
||||||
case ARG_QEMU_CAPS:
|
case ARG_QEMU_CAPS:
|
||||||
fakeCapsUsed = true;
|
fakeCapsUsed = true;
|
||||||
@ -740,8 +739,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
|||||||
fprintf(stderr, "Unexpected test info argument");
|
fprintf(stderr, "Unexpected test info argument");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
argname = va_arg(argptr, testQemuInfoArgName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!capsarch ^ !!capsver) {
|
if (!!capsarch ^ !!capsver) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user