diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-12-07 10:19:10 -0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-01-18 10:23:38 -0200 |
commit | a6aa9d3e2681199d159963e46524625d90669619 (patch) | |
tree | 4372e0694baa343a67169491f7b20f0916376be2 /monitor.c | |
parent | 8c4ec5c0269bda18bb777a64b2008088d1c632dc (diff) |
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>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 6 insertions, 1 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"); |