aboutsummaryrefslogtreecommitdiff
path: root/server-fn.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/server-fn.c b/server-fn.c
index 56c98462..1e1198dd 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -32,20 +32,19 @@ void server_callback_identify(int, short, void *);
void
server_fill_environ(struct session *s, struct environ *env)
{
- char var[PATH_MAX], *term;
- u_int idx;
- long pid;
+ char *term;
+ u_int idx;
+ long pid;
if (s != NULL) {
term = options_get_string(global_options, "default-terminal");
- environ_set(env, "TERM", term);
+ environ_set(env, "TERM", "%s", term);
idx = s->id;
} else
idx = (u_int)-1;
pid = getpid();
- xsnprintf(var, sizeof var, "%s,%ld,%u", socket_path, pid, idx);
- environ_set(env, "TMUX", var);
+ environ_set(env, "TMUX", "%s,%ld,%u", socket_path, pid, idx);
}
void