summaryrefslogtreecommitdiffstats
path: root/kex.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2022-11-07 11:05:38 +0100
committerDarren Tucker <dtucker@dtucker.net>2022-11-07 12:22:15 +0100
commit747691604d3325ed2b62bad85b6fd8563ad32f6c (patch)
tree51adc0527a9700722fca1415ad0dd044a94ccd28 /kex.c
parentupstream: Check for and disallow MaxStartups values less than or (diff)
downloadopenssh-747691604d3325ed2b62bad85b6fd8563ad32f6c.tar.xz
openssh-747691604d3325ed2b62bad85b6fd8563ad32f6c.zip
upstream: Remove some set but otherwise unused variables, spotted
in -portable by clang 16's -Wunused-but-set-variable. ok djm@ OpenBSD-Commit-ID: 3d943ddf2369b38fbf89f5f19728e7dc1daf3982
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kex.c b/kex.c
index 0bcd27dc5..8cdefcf7c 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.172 2022/02/01 23:32:51 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.173 2022/11/07 10:05:38 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -1215,7 +1215,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
const char *version_addendum)
{
int remote_major, remote_minor, mismatch, oerrno = 0;
- size_t len, i, n;
+ size_t len, n;
int r, expect_nl;
u_char c;
struct sshbuf *our_version = ssh->kex->server ?
@@ -1271,7 +1271,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
}
sshbuf_reset(peer_version);
expect_nl = 0;
- for (i = 0; ; i++) {
+ for (;;) {
if (timeout_ms > 0) {
r = waitrfd(ssh_packet_get_connection_in(ssh),
&timeout_ms);