summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-08-23 16:45:00 +0000
committernicm <nicm@openbsd.org>2009-08-23 16:45:00 +0000
commit61b706575064995d4286c75ecb316845438fe132 (patch)
treed0209cc1c8760cf8d6b5c1e885c077b54e1f8697 /usr.bin/tmux/cmd.c
parent- turn a printf(), which predated a panic()-function that could take printf-like arguments, (diff)
downloadwireguard-openbsd-61b706575064995d4286c75ecb316845438fe132.tar.xz
wireguard-openbsd-61b706575064995d4286c75ecb316845438fe132.zip
The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index b2e8203a02e..7bd5af4de7d 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.13 2009/08/08 21:52:43 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.14 2009/08/23 16:45:00 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -299,8 +299,8 @@ cmd_current_session(struct cmd_ctx *ctx)
u_int i;
int found;
- if (ctx->cursession != NULL)
- return (ctx->cursession);
+ if (ctx->curclient != NULL && ctx->curclient->session != NULL)
+ return (ctx->curclient->session);
/*
* If the name of the calling client's pty is know, build a list of the