From 43cd40e87a41d9504dcac99419c96e3cdbb81029 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 23 Aug 2009 16:45:00 +0000 Subject: The cursession member in struct cmd_ctx is always either curclient->session or NULL when curclient is also NULL, so just eliminate it. --- cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd.c') 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 -- cgit