-/* $OpenBSD: cfg.c,v 1.61 2017/10/06 18:02:30 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.62 2018/01/15 15:27:03 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
}
free(buf);
- if (cmdlist == NULL)
- continue;
new_item = cmdq_get_command(cmdlist, NULL, NULL, 0);
if (item != NULL)
cmdq_insert_after(item, new_item);
-/* $OpenBSD: cmd-find.c,v 1.57 2017/08/30 10:33:57 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.58 2018/01/15 15:27:03 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
/* Try special characters. */
if (strcmp(pane, "!") == 0) {
- if (fs->w->last == NULL)
- return (-1);
fs->wp = fs->w->last;
if (fs->wp == NULL)
return (-1);
-/* $OpenBSD: cmd-load-buffer.c,v 1.50 2017/04/22 06:13:30 nicm Exp $ */
+/* $OpenBSD: cmd-load-buffer.c,v 1.51 2018/01/15 15:27:03 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
struct client *c = item->client;
FILE *f;
const char *path, *bufname;
- char *pdata, *new_pdata, *cause, *file;
+ char *pdata = NULL, *new_pdata, *cause;
+ char *file;
size_t psize;
int ch, error;
f = fopen(file, "rb");
if (f == NULL) {
cmdq_error(item, "%s: %s", file, strerror(errno));
- free(file);
- return (CMD_RETURN_ERROR);
+ goto error;
}
pdata = NULL;