From: Paul Eggert Date: Wed, 11 May 2011 05:29:31 +0000 (-0700) Subject: * window.c (size_window): Avoid needless test at loop start. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~239^2~23^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=78eb494ecaa1a20112080faedfd30e616c5be76b;p=emacs.git * window.c (size_window): Avoid needless test at loop start. --- diff --git a/src/ChangeLog b/src/ChangeLog index f7010859baa..8dc51c0d01b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-05-11 Paul Eggert + + * window.c (size_window): Avoid needless test at loop start. + 2011-05-10 Juanma Barranquero * image.c (Finit_image_library): Return t for built-in image types, diff --git a/src/window.c b/src/window.c index 4dbee41c5f4..bc9f31e03e8 100644 --- a/src/window.c +++ b/src/window.c @@ -3094,11 +3094,14 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs Lisp_Object last_child; int child_size; - for (child = *forward; !NILP (child); child = c->next) + child = *forward; + do { c = XWINDOW (child); last_child = child; + child = c->next; } + while (!NILP (child)); child_size = WINDOW_TOTAL_SIZE (c, width_p); size_window (last_child, size - old_size + child_size,