upstream: Zap unused family parameter from ssh_connect_direct()

sshconnect.c r1.241 from 2013 made it unused;  found while reading code.

OK djm

OpenBSD-Commit-ID: 219ba6d7f9925d0b7992918612680399d86712b5
This commit is contained in:
kn@openbsd.org 2020-10-12 08:36:36 +00:00 committed by Damien Miller
parent e545d94b71
commit a336ce8c2c
3 changed files with 9 additions and 9 deletions

4
ssh.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssh.c,v 1.537 2020/10/03 09:22:26 djm Exp $ */ /* $OpenBSD: ssh.c,v 1.538 2020/10/12 08:36:36 kn Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -1542,7 +1542,7 @@ main(int ac, char **av)
/* Open a connection to the remote host. */ /* Open a connection to the remote host. */
if (ssh_connect(ssh, host, host_arg, addrs, &hostaddr, options.port, if (ssh_connect(ssh, host, host_arg, addrs, &hostaddr, options.port,
options.address_family, options.connection_attempts, options.connection_attempts,
&timeout_ms, options.tcp_keep_alive) != 0) &timeout_ms, options.tcp_keep_alive) != 0)
exit(255); exit(255);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect.c,v 1.339 2020/10/07 02:26:28 djm Exp $ */ /* $OpenBSD: sshconnect.c,v 1.340 2020/10/12 08:36:37 kn Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -442,8 +442,8 @@ fail:
*/ */
static int static int
ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop,
struct sockaddr_storage *hostaddr, u_short port, int family, struct sockaddr_storage *hostaddr, u_short port, int connection_attempts,
int connection_attempts, int *timeout_ms, int want_keepalive) int *timeout_ms, int want_keepalive)
{ {
int on = 1, saved_timeout_ms = *timeout_ms; int on = 1, saved_timeout_ms = *timeout_ms;
int oerrno, sock = -1, attempt; int oerrno, sock = -1, attempt;
@ -533,13 +533,13 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop,
int int
ssh_connect(struct ssh *ssh, const char *host, const char *host_arg, ssh_connect(struct ssh *ssh, const char *host, const char *host_arg,
struct addrinfo *addrs, struct sockaddr_storage *hostaddr, u_short port, struct addrinfo *addrs, struct sockaddr_storage *hostaddr, u_short port,
int family, int connection_attempts, int *timeout_ms, int want_keepalive) int connection_attempts, int *timeout_ms, int want_keepalive)
{ {
int in, out; int in, out;
if (options.proxy_command == NULL) { if (options.proxy_command == NULL) {
return ssh_connect_direct(ssh, host, addrs, hostaddr, port, return ssh_connect_direct(ssh, host, addrs, hostaddr, port,
family, connection_attempts, timeout_ms, want_keepalive); connection_attempts, timeout_ms, want_keepalive);
} else if (strcmp(options.proxy_command, "-") == 0) { } else if (strcmp(options.proxy_command, "-") == 0) {
if ((in = dup(STDIN_FILENO)) == -1 || if ((in = dup(STDIN_FILENO)) == -1 ||
(out = dup(STDOUT_FILENO)) == -1) { (out = dup(STDOUT_FILENO)) == -1) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect.h,v 1.42 2020/10/07 02:22:23 djm Exp $ */ /* $OpenBSD: sshconnect.h,v 1.43 2020/10/12 08:36:37 kn Exp $ */
/* /*
* Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2000 Markus Friedl. All rights reserved.
@ -35,7 +35,7 @@ struct ssh;
int ssh_connect(struct ssh *, const char *, const char *, int ssh_connect(struct ssh *, const char *, const char *,
struct addrinfo *, struct sockaddr_storage *, u_short, struct addrinfo *, struct sockaddr_storage *, u_short,
int, int, int *, int); int, int *, int);
void ssh_kill_proxy_command(void); void ssh_kill_proxy_command(void);
void ssh_login(struct ssh *, Sensitive *, const char *, void ssh_login(struct ssh *, Sensitive *, const char *,