sock_util: remove unneeded check

We loop while (server_sockfd == -1) so it's safe to assume that (server_sockfd != -1) once out of the loop.
This commit is contained in:
Nanquitas 2018-01-18 22:57:46 +01:00 committed by GitHub
parent 11f820efa7
commit 337205eb08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,8 +135,6 @@ void server_bind(struct sock_server *serv, u16 port)
server_sockfd = socSocket(AF_INET, SOCK_STREAM, 0);
}
if(server_sockfd != -1)
{
struct sockaddr_in saddr;
saddr.sin_family = AF_INET;
saddr.sin_port = htons(port);
@ -163,7 +161,6 @@ void server_bind(struct sock_server *serv, u16 port)
serv->ctx_ptrs[idx] = new_ctx;
}
}
}
}
void server_run(struct sock_server *serv)