- avsm@cvs.openbsd.org 2004/06/21 17:36:31
[auth-rsa.c auth2-gss.c auth2-pubkey.c authfile.c canohost.c channels.c
cipher.c dns.c kex.c monitor.c monitor_fdpass.c monitor_wrap.c
monitor_wrap.h nchan.c packet.c progressmeter.c scp.c sftp-server.c sftp.c
ssh-gss.h ssh-keygen.c ssh.c sshconnect.c sshconnect1.c sshlogin.c
sshpty.c]
make ssh -Wshadow clean, no functional changes
markus@ ok
There are also some portable-specific -Wshadow warnings to be fixed in
monitor.c and montior_wrap.c.
diff --git a/canohost.c b/canohost.c
index 54369d4..057f061 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.39 2004/03/31 21:58:47 djm Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.40 2004/06/21 17:36:31 avsm Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -28,7 +28,7 @@
*/
static char *
-get_remote_hostname(int socket, int use_dns)
+get_remote_hostname(int sock, int use_dns)
{
struct sockaddr_storage from;
int i;
@@ -39,13 +39,13 @@
/* Get IP address of client. */
fromlen = sizeof(from);
memset(&from, 0, sizeof(from));
- if (getpeername(socket, (struct sockaddr *)&from, &fromlen) < 0) {
+ if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
debug("getpeername failed: %.100s", strerror(errno));
cleanup_exit(255);
}
if (from.ss_family == AF_INET)
- check_ip_options(socket, ntop);
+ check_ip_options(sock, ntop);
ipv64_normalise_mapped(&from, &fromlen);
@@ -138,7 +138,7 @@
*/
/* IPv4 only */
static void
-check_ip_options(int socket, char *ipaddr)
+check_ip_options(int sock, char *ipaddr)
{
#ifdef IP_OPTIONS
u_char options[200];
@@ -152,7 +152,7 @@
else
ipproto = IPPROTO_IP;
option_size = sizeof(options);
- if (getsockopt(socket, ipproto, IP_OPTIONS, options,
+ if (getsockopt(sock, ipproto, IP_OPTIONS, options,
&option_size) >= 0 && option_size != 0) {
text[0] = '\0';
for (i = 0; i < option_size; i++)
@@ -227,7 +227,7 @@
* The returned string must be freed.
*/
static char *
-get_socket_address(int socket, int remote, int flags)
+get_socket_address(int sock, int remote, int flags)
{
struct sockaddr_storage addr;
socklen_t addrlen;
@@ -238,11 +238,11 @@
memset(&addr, 0, sizeof(addr));
if (remote) {
- if (getpeername(socket, (struct sockaddr *)&addr, &addrlen)
+ if (getpeername(sock, (struct sockaddr *)&addr, &addrlen)
< 0)
return NULL;
} else {
- if (getsockname(socket, (struct sockaddr *)&addr, &addrlen)
+ if (getsockname(sock, (struct sockaddr *)&addr, &addrlen)
< 0)
return NULL;
}
@@ -261,29 +261,29 @@
}
char *
-get_peer_ipaddr(int socket)
+get_peer_ipaddr(int sock)
{
char *p;
- if ((p = get_socket_address(socket, 1, NI_NUMERICHOST)) != NULL)
+ if ((p = get_socket_address(sock, 1, NI_NUMERICHOST)) != NULL)
return p;
return xstrdup("UNKNOWN");
}
char *
-get_local_ipaddr(int socket)
+get_local_ipaddr(int sock)
{
char *p;
- if ((p = get_socket_address(socket, 0, NI_NUMERICHOST)) != NULL)
+ if ((p = get_socket_address(sock, 0, NI_NUMERICHOST)) != NULL)
return p;
return xstrdup("UNKNOWN");
}
char *
-get_local_name(int socket)
+get_local_name(int sock)
{
- return get_socket_address(socket, 0, NI_NAMEREQD);
+ return get_socket_address(sock, 0, NI_NAMEREQD);
}
/*