diff options
author | nicm <nicm> | 2015-04-22 15:32:33 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-04-22 15:32:33 +0000 |
commit | 9a453dd3546b2c3053e8e34bf4d6775b1a05d3a8 (patch) | |
tree | bc2feb485e0aabb60a51f04ddc5f4b88926b807e /session.c | |
parent | 8d66f4fba4972d45be64d108c7c8d952f85016a8 (diff) |
Make session_has return a flag, returning the first winlink found is a
recipe for errors.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -309,16 +309,16 @@ session_detach(struct session *s, struct winlink *wl) } /* Return if session has window. */ -struct winlink * +int session_has(struct session *s, struct window *w) { struct winlink *wl; RB_FOREACH(wl, winlinks, &s->windows) { if (wl->window == w) - return (wl); + return (1); } - return (NULL); + return (0); } struct winlink * |