summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-new-session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-01-13 11:56:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-01-13 11:56:44 +0000
commitbf2d2fa8df4913d6d744a11c441e33c99c2c314b (patch)
tree7ec799b9f65adc2cc145a456e4acc69f10332c49 /usr.bin/tmux/cmd-new-session.c
parentdf7669d613887e329e34f9e6ef5a3c076023990a (diff)
Make options_get_string return const string.
Diffstat (limited to 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r--usr.bin/tmux/cmd-new-session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c
index ab54ef01562..a122ca0d7c0 100644
--- a/usr.bin/tmux/cmd-new-session.c
+++ b/usr.bin/tmux/cmd-new-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-session.c,v 1.95 2016/11/16 11:37:16 nicm Exp $ */
+/* $OpenBSD: cmd-new-session.c,v 1.96 2017/01/13 11:56:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -74,8 +74,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
struct environ *env;
struct termios tio, *tiop;
const char *newname, *target, *update, *errstr, *template;
- const char *path, *cwd, *to_free = NULL;
- char **argv, *cmd, *cause, *cp;
+ const char *path, *cmd, *cwd, *to_free = NULL;
+ char **argv, *cause, *cp;
int detached, already_attached, idx, argc;
u_int sx, sy;
struct format_tree *ft;
@@ -217,7 +217,7 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
cmd = options_get_string(global_s_options, "default-command");
if (cmd != NULL && *cmd != '\0') {
argc = 1;
- argv = &cmd;
+ argv = (char **)&cmd;
} else {
argc = 0;
argv = NULL;