diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-11-13 09:26:23 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-12-10 17:16:44 +0100 |
commit | ac84b0fa2857383ca25e86970fb12a067e56f66c (patch) | |
tree | b83d0cc3f8beb9d61fbae5890a2c2abce57b6852 /qga/commands-win32.c | |
parent | 99750d82e43e3825ded46b41828552d357f346bc (diff) | |
download | qemu-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.c | 3 |
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(); } } |