summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-08 22:06:48 +1100
committerDamien Miller <djm@mindrot.org>2002-02-08 22:06:48 +1100
commitf3dcf1fc88a55a916ace325e252c6f75ff53b71b (patch)
tree71814bc7b8b2661ada45995f13ab427b501955df
parent025e01c7f0afe5cb25a57c829137a55a9d1f4352 (diff)
- markus@cvs.openbsd.org 2002/02/06 14:37:22
[session.c] minor KNF
-rw-r--r--ChangeLog5
-rw-r--r--session.c14
2 files changed, 9 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6baf7e72..c92df748 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,9 @@
- mpech@cvs.openbsd.org 2002/02/06 14:27:23
[sftp.c]
sync usage() with manual.
+ - markus@cvs.openbsd.org 2002/02/06 14:37:22
+ [session.c]
+ minor KNF
20020205
- (djm) Cleanup after sync:
@@ -7525,4 +7528,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1833 2002/02/08 11:06:29 djm Exp $
+$Id: ChangeLog,v 1.1834 2002/02/08 11:06:48 djm Exp $
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));