mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
error: Use error_fatal to simplify obvious fatal errors (again)
We did this with scripts/coccinelle/use-error_fatal.cocci before, in commit50beeb6809
and007b06578a
. This commit cleans up rarer variations that don't seem worth matching with Coccinelle. Cc: Thomas Huth <thuth@redhat.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Peter Xu <peterx@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210720125408.387910-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
@ -671,18 +671,13 @@ static void qemu_spice_init(void)
|
||||
}
|
||||
passwordSecret = qemu_opt_get(opts, "password-secret");
|
||||
if (passwordSecret) {
|
||||
Error *local_err = NULL;
|
||||
if (qemu_opt_get(opts, "password")) {
|
||||
error_report("'password' option is mutually exclusive with "
|
||||
"'password-secret'");
|
||||
exit(1);
|
||||
}
|
||||
password = qcrypto_secret_lookup_as_utf8(passwordSecret,
|
||||
&local_err);
|
||||
if (!password) {
|
||||
error_report_err(local_err);
|
||||
exit(1);
|
||||
}
|
||||
&error_fatal);
|
||||
} else {
|
||||
str = qemu_opt_get(opts, "password");
|
||||
if (str) {
|
||||
|
Reference in New Issue
Block a user