summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-06-01 06:16:43 +0000
committerDamien Miller <djm@mindrot.org>2017-06-01 16:24:31 +1000
commit2d75d74272dc2a0521fce13cfe6388800c9a2406 (patch)
tree440f9c5b59bb7632a269b987605f09caae88b69e /packet.c
parent151c6e433a5f5af761c78de87d7b5d30a453cf5e (diff)
upstream commit
some warnings spotted by clang; ok markus@ Upstream-ID: 24381d68ca249c5cee4388ceb0f383fa5b43991b
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/packet.c b/packet.c
index 6ea2f4bb7..2661f647e 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.258 2017/05/31 08:58:52 deraadt Exp $ */ 1/* $OpenBSD: packet.c,v 1.259 2017/06/01 06:16:43 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -813,7 +813,7 @@ uncompress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out)
813void 813void
814ssh_clear_newkeys(struct ssh *ssh, int mode) 814ssh_clear_newkeys(struct ssh *ssh, int mode)
815{ 815{
816 if (ssh->kex && ssh->kex->newkeys) { 816 if (ssh->kex && ssh->kex->newkeys[mode]) {
817 kex_free_newkeys(ssh->kex->newkeys[mode]); 817 kex_free_newkeys(ssh->kex->newkeys[mode]);
818 ssh->kex->newkeys[mode] = NULL; 818 ssh->kex->newkeys[mode] = NULL;
819 } 819 }
@@ -829,19 +829,17 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
829 struct sshcipher_ctx **ccp; 829 struct sshcipher_ctx **ccp;
830 struct packet_state *ps; 830 struct packet_state *ps;
831 u_int64_t *max_blocks; 831 u_int64_t *max_blocks;
832 const char *wmsg, *dir; 832 const char *wmsg;
833 int r, crypt_type; 833 int r, crypt_type;
834 834
835 debug2("set_newkeys: mode %d", mode); 835 debug2("set_newkeys: mode %d", mode);
836 836
837 if (mode == MODE_OUT) { 837 if (mode == MODE_OUT) {
838 dir = "output";
839 ccp = &state->send_context; 838 ccp = &state->send_context;
840 crypt_type = CIPHER_ENCRYPT; 839 crypt_type = CIPHER_ENCRYPT;
841 ps = &state->p_send; 840 ps = &state->p_send;
842 max_blocks = &state->max_blocks_out; 841 max_blocks = &state->max_blocks_out;
843 } else { 842 } else {
844 dir = "input";
845 ccp = &state->receive_context; 843 ccp = &state->receive_context;
846 crypt_type = CIPHER_DECRYPT; 844 crypt_type = CIPHER_DECRYPT;
847 ps = &state->p_read; 845 ps = &state->p_read;