From 65d75985ce61588edcd6c576f724592c836c0327 Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 1 Jun 2017 06:16:43 +0000 Subject: [PATCH] some warnings spotted by clang; ok markus@ --- usr.bin/ssh/packet.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index b13ba77f2d7..c650d3966d7 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.258 2017/05/31 08:58:52 deraadt Exp $ */ +/* $OpenBSD: packet.c,v 1.259 2017/06/01 06:16:43 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -802,7 +802,7 @@ uncompress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out) void ssh_clear_newkeys(struct ssh *ssh, int mode) { - if (ssh->kex && ssh->kex->newkeys) { + if (ssh->kex && ssh->kex->newkeys[mode]) { kex_free_newkeys(ssh->kex->newkeys[mode]); ssh->kex->newkeys[mode] = NULL; } @@ -818,19 +818,17 @@ ssh_set_newkeys(struct ssh *ssh, int mode) struct sshcipher_ctx **ccp; struct packet_state *ps; u_int64_t *max_blocks; - const char *wmsg, *dir; + const char *wmsg; int r, crypt_type; debug2("set_newkeys: mode %d", mode); if (mode == MODE_OUT) { - dir = "output"; ccp = &state->send_context; crypt_type = CIPHER_ENCRYPT; ps = &state->p_send; max_blocks = &state->max_blocks_out; } else { - dir = "input"; ccp = &state->receive_context; crypt_type = CIPHER_DECRYPT; ps = &state->p_read; -- 2.20.1