summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-21 19:54:22 +0000
committernicm <nicm@openbsd.org>2009-07-21 19:54:22 +0000
commit980b7663d4908e6a49e53cfc3fb6925416ea415f (patch)
tree7e75667e1f16ec96fbe336c92a6375733e0127c1 /usr.bin/tmux/window.c
parentNix a few unused attributes on arguments which are no longer unused. (diff)
downloadwireguard-openbsd-980b7663d4908e6a49e53cfc3fb6925416ea415f.tar.xz
wireguard-openbsd-980b7663d4908e6a49e53cfc3fb6925416ea415f.zip
Make some functions which return unused values void (mostly found by lint) and
tweak a redundant expression in window_pane_set_mode.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index c632b1eeba4..052389700d9 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.14 2009/07/19 13:21:40 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.15 2009/07/21 19:54:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -301,13 +301,11 @@ window_destroy(struct window *w)
xfree(w);
}
-int
+void
window_resize(struct window *w, u_int sx, u_int sy)
{
w->sx = sx;
w->sy = sy;
-
- return (0);
}
void
@@ -532,13 +530,13 @@ window_pane_spawn(struct window_pane *wp,
return (0);
}
-int
+void
window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
{
struct winsize ws;
if (sx == wp->sx && sy == wp->sy)
- return (-1);
+ return;
wp->sx = sx;
wp->sy = sy;
@@ -552,7 +550,6 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
fatal("ioctl failed");
- return (0);
}
int
@@ -560,9 +557,8 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode)
{
struct screen *s;
- if (wp->mode != NULL || wp->mode == mode)
+ if (wp->mode != NULL)
return (1);
-
wp->mode = mode;
if ((s = wp->mode->init(wp)) != NULL)