pinosaur
/
dwm.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45768ee
)
simplified detach()
author
Anselm R Garbe
<garbeam@gmail.com>
Thu, 3 Jul 2008 09:58:35 +0000
(10:58 +0100)
committer
Anselm R Garbe
<garbeam@gmail.com>
Thu, 3 Jul 2008 09:58:35 +0000
(10:58 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
1554a16
..
3d9a063
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-459,16
+459,10
@@
destroynotify(XEvent *e) {
void
detach(Client *c) {
- Client *
i
;
+ Client *
*tc
;
- if (c != clients) {
- for(i = clients; i->next != c; i = i->next);
- i->next = c->next;
- }
- else {
- clients = c->next;
- }
- c->next = NULL;
+ for(tc = &clients; *tc && *tc != c; tc = &(*tc)->next);
+ *tc = c->next;
}
void