aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-win32.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-11-13 09:26:23 +0100
committerMarkus Armbruster <armbru@redhat.com>2020-12-10 17:16:44 +0100
commitac84b0fa2857383ca25e86970fb12a067e56f66c (patch)
treeb83d0cc3f8beb9d61fbae5890a2c2abce57b6852 /qga/commands-win32.c
parent99750d82e43e3825ded46b41828552d357f346bc (diff)
downloadqemu-ac84b0fa2857383ca25e86970fb12a067e56f66c.zip
qemu-ac84b0fa2857383ca25e86970fb12a067e56f66c.tar.gz
qemu-ac84b0fa2857383ca25e86970fb12a067e56f66c.tar.bz2
qga: Replace an unreachable error by abort()
check_suspend_mode()'s error message Parameter 'mode' expects GuestSuspendMode makes no sense to users: GuestSuspendMode is a C enum. Fortunately, it is unreachable. Replace it by abort(). Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201113082626.2725812-8-armbru@redhat.com>
Diffstat (limited to 'qga/commands-win32.c')
-rw-r--r--qga/commands-win32.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 300b87c..87dc43e 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1441,8 +1441,7 @@ static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
}
break;
default:
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "mode",
- "GuestSuspendMode");
+ abort();
}
}