From b7a4862fbf0df632837a53e230f4aa9cceb5f578 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 7 Mar 2012 19:00:21 -0600 Subject: Silence a couple pointless warnings. --- toys/netcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys') 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); } -- cgit v1.2.3