From: Max Kellermann Date: Mon, 22 Sep 2008 08:39:01 +0000 (+0200) Subject: screen_utils: hide cursor after screen_read_password() X-Git-Tag: v0.12_alpha1~184 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b3adcbe42bfcd5330748d599c88aca77b942dae4;p=ncmpc.git 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. --- diff --git a/src/screen_utils.c b/src/screen_utils.c index c6bfb54..5e534a1 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