Make session_has return a flag, returning the first winlink found is a

recipe for errors.
This commit is contained in:
nicm
2015-04-22 15:32:33 +00:00
parent 8d66f4fba4
commit 9a453dd354
4 changed files with 7 additions and 7 deletions

View File

@ -199,7 +199,7 @@ server_status_window(struct window *w)
*/
RB_FOREACH(s, sessions, &sessions) {
if (session_has(s, w) != NULL)
if (session_has(s, w))
server_status_session(s);
}
}
@ -268,7 +268,7 @@ server_kill_window(struct window *w)
s = next_s;
next_s = RB_NEXT(sessions, &sessions, s);
if (session_has(s, w) == NULL)
if (!session_has(s, w))
continue;
server_unzoom_window(w);
while ((wl = winlink_find_by_window(&s->windows, w)) != NULL) {