1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-30 03:18:51 +00:00

Some unused code, GitHub issue 1219.

This commit is contained in:
nicm 2018-01-15 15:27:03 +00:00
parent b0c1cefeda
commit 481703d669
3 changed files with 3 additions and 7 deletions

2
cfg.c
View File

@ -287,8 +287,6 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int quiet)
} }
free(buf); free(buf);
if (cmdlist == NULL)
continue;
new_item = cmdq_get_command(cmdlist, NULL, NULL, 0); new_item = cmdq_get_command(cmdlist, NULL, NULL, 0);
if (item != NULL) if (item != NULL)
cmdq_insert_after(item, new_item); cmdq_insert_after(item, new_item);

View File

@ -588,8 +588,6 @@ cmd_find_get_pane_with_window(struct cmd_find_state *fs, const char *pane)
/* Try special characters. */ /* Try special characters. */
if (strcmp(pane, "!") == 0) { if (strcmp(pane, "!") == 0) {
if (fs->w->last == NULL)
return (-1);
fs->wp = fs->w->last; fs->wp = fs->w->last;
if (fs->wp == NULL) if (fs->wp == NULL)
return (-1); return (-1);

View File

@ -59,7 +59,8 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
struct client *c = item->client; struct client *c = item->client;
FILE *f; FILE *f;
const char *path, *bufname; const char *path, *bufname;
char *pdata, *new_pdata, *cause, *file; char *pdata = NULL, *new_pdata, *cause;
char *file;
size_t psize; size_t psize;
int ch, error; int ch, error;
@ -89,8 +90,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
f = fopen(file, "rb"); f = fopen(file, "rb");
if (f == NULL) { if (f == NULL) {
cmdq_error(item, "%s: %s", file, strerror(errno)); cmdq_error(item, "%s: %s", file, strerror(errno));
free(file); goto error;
return (CMD_RETURN_ERROR);
} }
pdata = NULL; pdata = NULL;