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.
This commit is contained in:
Tiago Cunha
2009-07-23 13:10:38 +00:00
parent fb0301f8b8
commit 6708ad19c5
3 changed files with 7 additions and 12 deletions

View File

@ -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) {