Skip to content

Commit

Permalink
qga: Replace an unreachable error by abort()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
Markus Armbruster committed Dec 10, 2020
1 parent 99750d8 commit ac84b0f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions qga/commands-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit ac84b0f

Please sign in to comment.