diff --git a/ChangeLog b/ChangeLog
index f340b16e6021c14003fa097cd6ba0bcf1b6c703a..3b034e444fc214cf2060988902ce962b89f70e22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 	* src/prompt.c (do_prompt_abort): Remove this unneeded function, as
 	nothing can break out of do_prompt(), not a SIGWINCH either.
 	* src/prompt.c (get_prompt_string): Delete code that is dead now.
+	* src/prompt.c (get_prompt_string): Elide an unneeded variable.
 
 2016-01-20  Benno Schulenberg  <bensberg@justemail.net>
 	* src/files.c (open_buffer): Readjust the indentation and a comment.
diff --git a/src/prompt.c b/src/prompt.c
index b3c1946c3f81f81d1a3d4af522b2170f59e37712..0e51ef219143078f0eda234d8ecde4450a3f1a7a 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -734,7 +734,6 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
 {
     int kbinput = ERR;
     bool ran_func, finished;
-    size_t curranswer_len;
     functionptrtype func;
 #ifndef DISABLE_TABCOMP
     bool tabbed = FALSE;
@@ -756,10 +755,9 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
 #endif /* !DISABLE_HISTORIES */
 
     answer = mallocstrcpy(answer, curranswer);
-    curranswer_len = strlen(answer);
 
-    if (statusbar_x == (size_t)-1 || statusbar_x > curranswer_len) {
-	statusbar_x = curranswer_len;
+    if (statusbar_x > strlen(answer)) {
+	statusbar_x = strlen(answer);
 	statusbar_pww = statusbar_xplustabs();
     }