From: Max Kellermann Date: Mon, 22 Sep 2008 08:39:01 +0000 (+0200) Subject: screen_utils: simplified call to wreadln_masked() X-Git-Tag: v0.12_alpha1~183 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=564ec056a44fa248ba2c3b2edc7f9be980bb20ad;p=ncmpc.git screen_utils: simplified call to wreadln_masked() If prompt is NULL, do not add a second call to wreadln_masked() with a literal string, but assign this literal string to the variable "prompt". This saves several bytes in the compiled binary. --- diff --git a/src/screen_utils.c b/src/screen_utils.c index 5e534a1..b614121 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -116,9 +116,8 @@ screen_read_password(WINDOW *w, const char *prompt) colors_use(w, COLOR_STATUS_ALERT); if (prompt == NULL) - ret = wreadln_masked(w, _("Password: "), NULL, COLS, NULL, NULL); - else - ret = wreadln_masked(w, prompt, NULL, COLS, NULL, NULL); + prompt = _("Password: "); + ret = wreadln_masked(w, prompt, NULL, COLS, NULL, NULL); curs_set(0); return ret;