mirror of
https://github.com/tmux/tmux.git
synced 2026-03-05 23:35:35 +00:00
Initialize bufname, reported by Mark Kelly.
This commit is contained in:
@@ -57,14 +57,12 @@ cmd_set_buffer_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
{
|
{
|
||||||
struct args *args = cmd_get_args(self);
|
struct args *args = cmd_get_args(self);
|
||||||
struct client *tc = cmdq_get_target_client(item);
|
struct client *tc = cmdq_get_target_client(item);
|
||||||
struct paste_buffer *pb;
|
struct paste_buffer *pb = NULL;
|
||||||
char *bufname, *bufdata = NULL, *cause = NULL;
|
char *bufname = NULL, *bufdata = NULL, *cause = NULL;
|
||||||
const char *olddata;
|
const char *olddata;
|
||||||
size_t bufsize = 0, newsize;
|
size_t bufsize = 0, newsize;
|
||||||
|
|
||||||
if (args_get(args, 'b') == NULL)
|
if (args_get(args, 'b') != NULL) {
|
||||||
pb = NULL;
|
|
||||||
else {
|
|
||||||
bufname = xstrdup(args_get(args, 'b'));
|
bufname = xstrdup(args_get(args, 'b'));
|
||||||
pb = paste_get_name(bufname);
|
pb = paste_get_name(bufname);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user