From 19166795066a375b7a6f98f15dfc2271e0e549f1 Mon Sep 17 00:00:00 2001 From: Viktor Mihajlovski Date: Wed, 17 Oct 2012 16:48:42 +0200 Subject: [PATCH] qemu: Fixed default machine detection in qemuCapsParseMachineTypesStr The machine in the last output line of -M ? was always reported as default machine even if this wasn't the actual default. Trivial fix. Signed-off-by: Viktor Mihajlovski --- src/qemu/qemu_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fb0fe54546..985d4def3b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -284,7 +284,7 @@ qemuCapsParseMachineTypesStr(const char *output, goto no_memory; p = t; - if (!(t = strstr(p, "(default)")) && (!next || t < next)) + if ((t = strstr(p, "(default)")) && (!next || t < next)) defIdx = caps->nmachineTypes; if ((t = strstr(p, "(alias of ")) && (!next || t < next)) { -- GitLab