mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
vnc: Simplify vnc_display_password()
Drop the qerror_report() call from it and let its callers set the error themselves. This also allows for dropping the 'ret' variable. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
8c4ec5c026
commit
a6aa9d3e26
3 changed files with 10 additions and 12 deletions
|
@ -929,7 +929,12 @@ static int set_password(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
|||
}
|
||||
/* Note that setting an empty password will not disable login through
|
||||
* this interface. */
|
||||
return vnc_display_password(NULL, password);
|
||||
rc = vnc_display_password(NULL, password);
|
||||
if (rc < 0) {
|
||||
qerror_report(QERR_SET_PASSWD_FAILED);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
qerror_report(QERR_INVALID_PARAMETER, "protocol");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue