summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2007-11-20 13:34:45 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-11-20 13:34:45 +0000
commit474699f14d580247a99000e435388a36d146aaf7 (patch)
treef4afab380567ce5250a38ceeafe1c0e57863d3f7
parent66080034ee896c2a3249f98dfc94011ff08cb594 (diff)
downloadirssi-474699f14d580247a99000e435388a36d146aaf7.zip
Remove unneeded casts.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4647 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/core/network.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/network.c b/src/core/network.c
index bf7fbb97..f0503f32 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -182,10 +182,8 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip)
#ifndef WIN32
fcntl(handle, F_SETFL, O_NONBLOCK);
#endif
- setsockopt(handle, SOL_SOCKET, SO_REUSEADDR,
- (char *) &opt, sizeof(opt));
- setsockopt(handle, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &opt, sizeof(opt));
+ setsockopt(handle, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ setsockopt(handle, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
/* set our own address */
if (my_ip != NULL) {
@@ -293,10 +291,8 @@ GIOChannel *net_listen(IPADDR *my_ip, int *port)
#ifndef WIN32
fcntl(handle, F_SETFL, O_NONBLOCK);
#endif
- setsockopt(handle, SOL_SOCKET, SO_REUSEADDR,
- (char *) &opt, sizeof(opt));
- setsockopt(handle, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &opt, sizeof(opt));
+ setsockopt(handle, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ setsockopt(handle, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt));
/* specify the address/port we want to listen in */
ret = bind(handle, &so.sa, SIZEOF_SOCKADDR(so));