mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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:
7
window.c
7
window.c
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user