summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-23 16:45:00 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-23 16:45:00 +0000
commit43cd40e87a41d9504dcac99419c96e3cdbb81029 (patch)
treef6ec67c9e1fd7cd800ce8ef67b96633afd7cacff /cmd.c
parent1eb303e6d401c1ef2992933532eb2d7eab36cecf (diff)
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 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index b0f785f9..21f2052f 100644
--- a/cmd.c
+++ b/cmd.c
@@ -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