home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a490bd
)
Slightly re-structured and re-styled a for-loop for greater understandability.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 30 Jul 2013 01:38:35 +0000
(
03:38
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 30 Jul 2013 01:38:35 +0000
(
03:38
+0200)
src/windows.c
patch
|
blob
|
history
diff --git
a/src/windows.c
b/src/windows.c
index 46124c5639a8b4c0b984e274adc573d5aa4bf235..362e10a475a3063a463ab3ce4fdb1e7d26ef24c9 100644
(file)
--- 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++)