summaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-01-21 07:58:06 +0100
committerDamien Miller <djm@mindrot.org>2022-01-25 00:33:03 +0100
commitd23b4f7fdb1bd87e2cd7a9ae7c198ae99d347916 (patch)
treef3e6fe920b2c312a3c1541784512bbc85aa16fea /packet.c
parentupstream: When poll(2) returns -1, for some error conditions (diff)
downloadopenssh-d23b4f7fdb1bd87e2cd7a9ae7c198ae99d347916.tar.xz
openssh-d23b4f7fdb1bd87e2cd7a9ae7c198ae99d347916.zip
upstream: correct comment and use local variable instead of long
indirection; spotted by dtucker@ OpenBSD-Commit-ID: 5f65f5f69db2b7d80a0a81b08f390a63f8845965
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/packet.c b/packet.c
index d81d01a1c..5a50fcd95 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.305 2022/01/17 22:56:04 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.306 2022/01/21 06:58:06 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1760,10 +1760,9 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
}
/*
- * Buffers the given amount of input characters. This is intended to be used
- * together with packet_read_poll.
+ * Buffers the supplied input data. This is intended to be used together
+ * with packet_read_poll().
*/
-
int
ssh_packet_process_incoming(struct ssh *ssh, const char *buf, u_int len)
{
@@ -1779,7 +1778,7 @@ ssh_packet_process_incoming(struct ssh *ssh, const char *buf, u_int len)
state->packet_discard -= len;
return 0;
}
- if ((r = sshbuf_put(ssh->state->input, buf, len)) != 0)
+ if ((r = sshbuf_put(state->input, buf, len)) != 0)
return r;
return 0;