diff --git a/ChangeLog b/ChangeLog
index cf8993da9b8437dc2b3e70b1442f070c9fd15928..4635bb6c56efdbda044a7fab2d42edb44353704b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 	* src/text.c (do_redo): For an INSERT, 'u->mark_begin_lineno' is not
 	an actual line number, so spoof it.  It can be spoofed, because 'f'
 	is not used for the INSERT case.  This fixes Savannah bug #45524.
+	* src/text.c (do_redo): Remove a condition that can never occur.
+	Also rewrite a loop to become somewhat clearer.
 
 2015-10-27  Benno Schulenberg  <bensberg@justemail.net>
 	* src/move.c (do_next_word): Rewrite this function to use the same
diff --git a/src/text.c b/src/text.c
index e1b42f7880a2c426e0cc7eb33b373287a07adcad..e704a36c1d03aab6d330cf2d5caa413a244fbcd4 100644
--- a/src/text.c
+++ b/src/text.c
@@ -624,20 +624,18 @@ void do_undo(void)
 /* Redo the last thing(s) we undid. */
 void do_redo(void)
 {
-    undo *u = openfile->undotop;
     size_t len = 0;
     char *data, *redidmsg = NULL;
+    undo *u = openfile->undotop;
 
-    for (; u != NULL && u->next != openfile->current_undo; u = u->next)
-	;
-    if (!u) {
+    /* Get the previous undo item. */
+    while (u->next != openfile->current_undo && u != NULL)
+	u = u->next;
+
+    if (u == NULL) {
 	statusbar(_("Nothing to re-do!"));
 	return;
     }
-    if (u->next != openfile->current_undo) {
-	statusbar(_("Internal error: cannot set up redo.  Please save your work."));
-	return;
-    }
 
     filestruct *f = fsfromline(u->type == INSERT ? 1 : u->mark_begin_lineno);
     if (!f) {