summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authordjm <djm>2002-02-08 11:06:48 +0000
committerdjm <djm>2002-02-08 11:06:48 +0000
commit85d08424db9c08f09f5ef8e49b559ea323041dfa (patch)
tree80b30cce714a4b1b701987d570bc4471a63976ac /session.c
parentffc3ed4e0432aaf61b8e4776b7c90a91cc7a660d (diff)
downloadopenssh-85d08424db9c08f09f5ef8e49b559ea323041dfa.tar.gz
- markus@cvs.openbsd.org 2002/02/06 14:37:22
[session.c] minor KNF
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/session.c b/session.c
index 9bc01a06..431936ac 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.123 2002/02/03 17:53:25 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.124 2002/02/06 14:37:22 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1825,23 +1825,19 @@ static void
session_exit_message(Session *s, int status)
{
Channel *c;
- if (s == NULL)
- fatal("session_close: no session");
- c = channel_lookup(s->chanid);
- if (c == NULL)
+
+ if ((c = channel_lookup(s->chanid)) == NULL)
fatal("session_exit_message: session %d: no channel %d",
s->self, s->chanid);
debug("session_exit_message: session %d channel %d pid %d",
s->self, s->chanid, s->pid);
if (WIFEXITED(status)) {
- channel_request_start(s->chanid,
- "exit-status", 0);
+ channel_request_start(s->chanid, "exit-status", 0);
packet_put_int(WEXITSTATUS(status));
packet_send();
} else if (WIFSIGNALED(status)) {
- channel_request_start(s->chanid,
- "exit-signal", 0);
+ channel_request_start(s->chanid, "exit-signal", 0);
packet_put_int(WTERMSIG(status));
#ifdef WCOREDUMP
packet_put_char(WCOREDUMP(status));