From 9a453dd3546b2c3053e8e34bf4d6775b1a05d3a8 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 22 Apr 2015 15:32:33 +0000 Subject: Make session_has return a flag, returning the first winlink found is a recipe for errors. --- server-fn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server-fn.c') diff --git a/server-fn.c b/server-fn.c index 83ea9474..c5487aa6 100644 --- a/server-fn.c +++ b/server-fn.c @@ -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) { -- cgit