summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-05 01:31:28 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-05 01:31:28 +0000
commit733a2351f52f8c8451a61f0ae636081f55b019f7 (patch)
tree21ae2ef0ba10ea252420cfe0c0b2b1aca0647529
parente86de51afb891a21b9d5c0a3596b946741876c55 (diff)
- stevesk@cvs.openbsd.org 2002/02/27 21:23:13
[canohost.c channels.c packet.c sshd.c] remove unneeded casts in [gs]etsockopt(); ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--canohost.c4
-rw-r--r--channels.c9
-rw-r--r--packet.c6
-rw-r--r--sshd.c10
5 files changed, 18 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 458b82f5..4bc6043f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,9 @@
- stevesk@cvs.openbsd.org 2002/02/26 20:03:51
[misc.c]
use socklen_t
+ - stevesk@cvs.openbsd.org 2002/02/27 21:23:13
+ [canohost.c channels.c packet.c sshd.c]
+ remove unneeded casts in [gs]etsockopt(); ok markus@
20020226
- (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
@@ -7745,4 +7748,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1894 2002/03/05 01:28:14 mouring Exp $
+$Id: ChangeLog,v 1.1895 2002/03/05 01:31:28 mouring Exp $
diff --git a/canohost.c b/canohost.c
index 5eb67f67..03005aa2 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.30 2002/01/29 14:32:03 markus Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.31 2002/02/27 21:23:13 stevesk Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -154,7 +154,7 @@ check_ip_options(int socket, char *ipaddr)
else
ipproto = IPPROTO_IP;
option_size = sizeof(options);
- if (getsockopt(socket, ipproto, IP_OPTIONS, (void *)options,
+ if (getsockopt(socket, ipproto, IP_OPTIONS, options,
&option_size) >= 0 && option_size != 0) {
text[0] = '\0';
for (i = 0; i < option_size; i++)
diff --git a/channels.c b/channels.c
index 325f278f..d5a24311 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.169 2002/02/24 19:59:42 stevesk Exp $");
+RCSID("$OpenBSD: channels.c,v 1.170 2002/02/27 21:23:13 stevesk Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1184,8 +1184,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset)
socklen_t sz = sizeof(err);
if (FD_ISSET(c->sock, writeset)) {
- if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err,
- &sz) < 0) {
+ if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) {
err = errno;
error("getsockopt SO_ERROR failed");
}
@@ -2036,10 +2035,10 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
* Set socket options. We would like the socket to disappear
* as soon as it has been closed for whatever reason.
*/
- setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on));
+ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
linger.l_onoff = 1;
linger.l_linger = 5;
- setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger));
+ setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
debug("Local forwarding listening on %s port %s.", ntop, strport);
/* Bind the socket to the address. */
diff --git a/packet.c b/packet.c
index a9146764..045d5a10 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.89 2002/02/24 16:58:32 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.90 2002/02/27 21:23:13 stevesk Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -1218,7 +1218,7 @@ packet_set_interactive(int interactive)
#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
if (packet_connection_is_ipv4()) {
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS,
- (void *) &lowdelay, sizeof(lowdelay)) < 0)
+ &lowdelay, sizeof(lowdelay)) < 0)
error("setsockopt IPTOS_LOWDELAY: %.100s",
strerror(errno));
}
@@ -1230,7 +1230,7 @@ packet_set_interactive(int interactive)
* IPTOS_THROUGHPUT.
*/
#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
- if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
+ if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, &throughput,
sizeof(throughput)) < 0)
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
#endif
diff --git a/sshd.c b/sshd.c
index 21a5f9c1..ea929325 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.227 2002/02/24 16:09:52 stevesk Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.228 2002/02/27 21:23:13 stevesk Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -900,11 +900,11 @@ main(int ac, char **av)
* close.
*/
setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,
- (void *) &on, sizeof(on));
+ &on, sizeof(on));
linger.l_onoff = 1;
linger.l_linger = 5;
setsockopt(listen_sock, SOL_SOCKET, SO_LINGER,
- (void *) &linger, sizeof(linger));
+ &linger, sizeof(linger));
debug("Bind to port %s on %s.", strport, ntop);
@@ -1150,11 +1150,11 @@ main(int ac, char **av)
/* setsockopt(sock_in, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */
linger.l_onoff = 1;
linger.l_linger = 5;
- setsockopt(sock_in, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger));
+ setsockopt(sock_in, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
/* Set keepalives if requested. */
if (options.keepalives &&
- setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
+ setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,
sizeof(on)) < 0)
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));