diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-22 21:34:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-22 21:34:37 +0000 |
commit | e41064f2d581f595fb6a8e170019289a9744b7b4 (patch) | |
tree | 66ec7c00529279b21dfbee72963e85f0065f0725 /usr.bin/tmux/window.c | |
parent | 15cdd92be12097f8167f317f8112f1f4fd4e1198 (diff) |
window_add_pane cannot fail, so remove the unused cause argument and don't
bother to check for a NULL return.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r-- | usr.bin/tmux/window.c | 9 |
1 files changed, 3 insertions, 6 deletions
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; |