get rid of potential warning
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4377 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -69,18 +69,23 @@ void
|
|||||||
mini_inetd (int port)
|
mini_inetd (int port)
|
||||||
{
|
{
|
||||||
struct sockaddr_in sa;
|
struct sockaddr_in sa;
|
||||||
int s = socket(AF_INET, SOCK_STREAM, 0);
|
int s;
|
||||||
int s2;
|
int s2;
|
||||||
int one = 1;
|
|
||||||
if(s < 0){
|
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
|
if(s < 0) {
|
||||||
perror("socket");
|
perror("socket");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#if defined(SO_REUSEADDR) && defined(HAVE_SETSOCKOPT)
|
#if defined(SO_REUSEADDR) && defined(HAVE_SETSOCKOPT)
|
||||||
if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&one,
|
{
|
||||||
sizeof(one)) < 0){
|
int one = 1;
|
||||||
perror("setsockopt");
|
|
||||||
exit(1);
|
if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&one,
|
||||||
|
sizeof(one)) < 0){
|
||||||
|
perror("setsockopt");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
|
Reference in New Issue
Block a user