aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-22 10:39:01 +0200
committerMax Kellermann <max@duempel.org>2008-09-22 10:39:01 +0200
commitb3adcbe42bfcd5330748d599c88aca77b942dae4 (patch)
tree161ea9e17f69eea78f14c9daeb1f521eeba6fbde /src
parent93f8b6593ea4d42b630acf8e3237265c1c50b570 (diff)
downloadmpd-b3adcbe42bfcd5330748d599c88aca77b942dae4.tar.gz
mpd-b3adcbe42bfcd5330748d599c88aca77b942dae4.tar.xz
mpd-b3adcbe42bfcd5330748d599c88aca77b942dae4.zip
screen_utils: hide cursor after screen_read_password()
The call to curs_set(0) in screen_read_password() was dead code, because it was after the function return. Repair that.
Diffstat (limited to 'src')
-rw-r--r--src/screen_utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/screen_utils.c b/src/screen_utils.c
index c6bfb543c..5e534a12e 100644
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
@@ -100,6 +100,8 @@ screen_getstr(WINDOW *w, const char *prompt)
static char *
screen_read_password(WINDOW *w, const char *prompt)
{
+ char *ret;
+
if (w == NULL) {
int rows, cols;
getmaxyx(stdscr, rows, cols);
@@ -114,11 +116,12 @@ screen_read_password(WINDOW *w, const char *prompt)
colors_use(w, COLOR_STATUS_ALERT);
if (prompt == NULL)
- return wreadln_masked(w, _("Password: "), NULL, COLS, NULL, NULL);
+ ret = wreadln_masked(w, _("Password: "), NULL, COLS, NULL, NULL);
else
- return wreadln_masked(w, prompt, NULL, COLS, NULL, NULL);
+ ret = wreadln_masked(w, prompt, NULL, COLS, NULL, NULL);
curs_set(0);
+ return ret;
}
static gint