diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 13:10:38 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 13:10:38 +0000 |
commit | 6708ad19c5acc28d3a1a1ad710fd4624365f68e2 (patch) | |
tree | 78c5f7e090b86619cfd5696604eb659806bab5df | |
parent | fb0301f8b89988469603d2573904633aff075c10 (diff) | |
download | rtmux-6708ad19c5acc28d3a1a1ad710fd4624365f68e2.tar.gz rtmux-6708ad19c5acc28d3a1a1ad710fd4624365f68e2.tar.bz2 rtmux-6708ad19c5acc28d3a1a1ad710fd4624365f68e2.zip |
Sync OpenBSD patchset 165:
window_add_pane cannot fail, so remove the unused cause argument and don't
bother to check for a NULL return.
-rw-r--r-- | cmd-split-window.c | 6 | ||||
-rw-r--r-- | tmux.h | 4 | ||||
-rw-r--r-- | window.c | 9 |
3 files changed, 7 insertions, 12 deletions
diff --git a/cmd-split-window.c b/cmd-split-window.c index e9d51fe2..787a153e 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $Id: cmd-split-window.c,v 1.19 2009-07-20 15:42:05 tcunha Exp $ */ +/* $Id: cmd-split-window.c,v 1.20 2009-07-23 13:10:38 tcunha 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) { @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.385 2009-07-23 12:57:45 tcunha Exp $ */ +/* $Id: tmux.h,v 1.386 2009-07-23 13:10:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1468,7 +1468,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); @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.97 2009-07-22 17:46:53 tcunha Exp $ */ +/* $Id: window.c,v 1.98 2009-07-23 13:10:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -258,10 +258,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); @@ -320,7 +317,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; |