diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-02-06 14:37:23 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-02-06 14:37:23 +0000 |
commit | 5ee62c8b71b9e656ebc7c8d99367142fb8359dc0 (patch) | |
tree | 5dd259f39a5dd1d769bd504e690f001f778c6ad5 | |
parent | 723639eeb3f4d1e82831114518be8fd1c75752f1 (diff) |
minor KNF
-rw-r--r-- | usr.bin/ssh/session.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 1aa478e4a87..3d1644f0dcc 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/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" @@ -1471,23 +1471,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)); packet_put_char(WCOREDUMP(status)); packet_put_cstring(""); |