recipe for errors.
-/* $OpenBSD: resize.c,v 1.15 2015/04/22 15:30:11 nicm Exp $ */
+/* $OpenBSD: resize.c,v 1.16 2015/04/22 15:32:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
if (flag)
has = s->curw->window == w;
else
- has = session_has(s, w) != NULL;
+ has = session_has(s, w);
if (has) {
if (s->sx < ssx)
ssx = s->sx;
-/* $OpenBSD: server-fn.c,v 1.82 2015/04/21 21:24:49 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.83 2015/04/22 15:32:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
*/
RB_FOREACH(s, sessions, &sessions) {
- if (session_has(s, w) != NULL)
+ if (session_has(s, w))
server_status_session(s);
}
}
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) {
-/* $OpenBSD: session.c,v 1.46 2014/10/22 23:18:53 nicm Exp $ */
+/* $OpenBSD: session.c,v 1.47 2015/04/22 15:32:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
}
/* 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 *
-/* $OpenBSD: tmux.h,v 1.496 2015/04/22 15:30:11 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.497 2015/04/22 15:32:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
struct winlink *session_attach(struct session *, struct window *, int,
char **);
int session_detach(struct session *, struct winlink *);
-struct winlink *session_has(struct session *, struct window *);
+int session_has(struct session *, struct window *);
int session_next(struct session *, int);
int session_previous(struct session *, int);
int session_select(struct session *, int);