aboutsummaryrefslogtreecommitdiff
path: root/toys/netcat.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-03-07 19:00:21 -0600
committerRob Landley <rob@landley.net>2012-03-07 19:00:21 -0600
commitb7a4862fbf0df632837a53e230f4aa9cceb5f578 (patch)
treed5f557b3386a3f527dba1373b4440ba2b9d91811 /toys/netcat.c
parente430db2894bedba6e06693c93ddab4ae28bd7ca3 (diff)
downloadtoybox-b7a4862fbf0df632837a53e230f4aa9cceb5f578.tar.gz
Silence a couple pointless warnings.
Diffstat (limited to 'toys/netcat.c')
-rw-r--r--toys/netcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/netcat.c b/toys/netcat.c
index 1b51337e..3da19127 100644
--- a/toys/netcat.c
+++ b/toys/netcat.c
@@ -122,7 +122,7 @@ void netcat_main(void)
address.sin_port = SWAP_BE16(TT.port);
if (TT.source_address)
lookup_name(TT.source_address, (uint32_t *)&address.sin_addr);
- if (bind(sockfd, &address, sizeof(address)))
+ if (bind(sockfd, (struct sockaddr *)&address, sizeof(address)))
perror_exit("bind");
}
@@ -143,7 +143,7 @@ void netcat_main(void)
if (listen(sockfd, 5)) error_exit("listen");
if (!TT.port) {
- getsockname(sockfd, &address, &len);
+ getsockname(sockfd, (struct sockaddr *)&address, &len);
printf("%d\n", SWAP_BE16(address.sin_port));
fflush(stdout);
}