wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit aa5213f0f939fea954a896327a0674d711998afd
parent 5a301641bf5d788102d4de8c925955041c875308
Author: Kris Maglione <bsdaemon@wmii.de>
Date:   Thu,  8 Jun 2006 16:23:21 -0400

Fix bad, broken code in link detach


Diffstat:
libixp/server.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libixp/server.c b/libixp/server.c @@ -35,15 +35,11 @@ void ixp_server_close_conn(IXPConn *c) { IXPServer *s = c->srv; - IXPConn *tc; + IXPConn **tc; IXPMap *m; - if(s->conn == c) - s->conn = c->next; - else { - for(tc=s->conn; tc && tc->next != c; tc=tc->next); - if(tc) - tc->next = c->next; - } + for(tc=&s->conn; *tc && *tc != c; tc=&(*tc)->next); + cext_assert(*tc == c); + *tc = c->next; while((m = c->map)) { c->map = m->next; free(m);