diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-23 16:45:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-23 16:45:00 +0000 |
commit | 43cd40e87a41d9504dcac99419c96e3cdbb81029 (patch) | |
tree | f6ec67c9e1fd7cd800ce8ef67b96633afd7cacff /cmd.c | |
parent | 1eb303e6d401c1ef2992933532eb2d7eab36cecf (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |