From 564ec056a44fa248ba2c3b2edc7f9be980bb20ad Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Sep 2008 10:39:01 +0200 Subject: 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. --- src/screen_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/screen_utils.c') 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; -- cgit v1.2.3