diff options
author | Max Kellermann <max@duempel.org> | 2008-09-22 10:39:01 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-22 10:39:01 +0200 |
commit | 564ec056a44fa248ba2c3b2edc7f9be980bb20ad (patch) | |
tree | 0b0d1bcb0825d56341297356a7fed014728509fa /src/screen_utils.c | |
parent | b3adcbe42bfcd5330748d599c88aca77b942dae4 (diff) | |
download | mpd-564ec056a44fa248ba2c3b2edc7f9be980bb20ad.tar.gz mpd-564ec056a44fa248ba2c3b2edc7f9be980bb20ad.tar.xz mpd-564ec056a44fa248ba2c3b2edc7f9be980bb20ad.zip |
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.
Diffstat (limited to 'src/screen_utils.c')
-rw-r--r-- | src/screen_utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/screen_utils.c b/src/screen_utils.c index 5e534a12e..b6141216c 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; |