From 322bd8d0b863f89bc6ce864a853b57b554a1cabf Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 30 Jul 2013 03:38:35 +0200
Subject: [PATCH] Slightly re-structured and re-styled a for-loop for greater
 understandability.

---
 src/windows.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/windows.c b/src/windows.c
index 46124c5..362e10a 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -438,11 +438,11 @@ extern void shift_active_win(struct WinMeta * wmeta, char dir)
 
         /* Suspend all visible windows. */
         uint16_t i, i_max;
-        for (i_max = 1, w_p = wmeta->chain_start;
+        for (w_p = wmeta->chain_start, i_max = 1;
              w_p != wmeta->chain_end;
-             i_max++)
+             w_p = w_p->next)
         {
-            w_p = w_p->next;
+            i_max++;
         }
         struct Win ** wins = malloc(i_max * sizeof(struct Win *));
         for (i = 0, w_p = wmeta->chain_start; i < i_max; i++)
-- 
2.30.2