diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 | ||||
-rw-r--r-- | usr.bin/tmux/window.c | 9 |
3 files changed, 7 insertions, 12 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index 2d7787ab933..ad27dd08ec0 100644 --- a/usr.bin/tmux/cmd-split-window.c +++ b/usr.bin/tmux/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.5 2009/07/19 13:21:40 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.6 2009/07/22 21:34:36 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -184,9 +184,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx) if (data->flag_horizontal) type = LAYOUT_LEFTRIGHT; - wp = window_add_pane(w, hlimit, &cause); - if (wp == NULL) - goto error; + wp = window_add_pane(w, hlimit); if (window_pane_spawn(wp, cmd, cwd, env, &cause) != 0) goto error; if (layout_split_pane(w->active, type, size, wp) != 0) { diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index d4d67d70473..69481cd8704 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.50 2009/07/22 20:56:58 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.51 2009/07/22 21:34:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1469,7 +1469,7 @@ struct window *window_create(const char *, const char *, const char *, const char **, u_int, u_int, u_int, char **); void window_destroy(struct window *); void window_set_active_pane(struct window *, struct window_pane *); -struct window_pane *window_add_pane(struct window *, u_int, char **); +struct window_pane *window_add_pane(struct window *, u_int); void window_resize(struct window *, u_int, u_int); void window_remove_pane(struct window *, struct window_pane *); struct window_pane *window_pane_at_index(struct window *, u_int); diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 052389700d9..d03d9538cda 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.15 2009/07/21 19:54:22 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.16 2009/07/22 21:34:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -260,10 +260,7 @@ window_create(const char *name, const char *cmd, const char *cwd, struct window_pane *wp; w = window_create1(sx, sy); - if ((wp = window_add_pane(w, hlimit, cause)) == NULL) { - window_destroy(w); - return (NULL); - } + wp = window_add_pane(w, hlimit); layout_init(w); if (window_pane_spawn(wp, cmd, cwd, envp, cause) != 0) { window_destroy(w); @@ -322,7 +319,7 @@ window_set_active_pane(struct window *w, struct window_pane *wp) } struct window_pane * -window_add_pane(struct window *w, u_int hlimit, unused char **cause) +window_add_pane(struct window *w, u_int hlimit) { struct window_pane *wp; |