We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb4cf08 commit ef92b51Copy full SHA for ef92b51
server.c
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
32
fd_set readset, tempset;
33
int num_clients = 0;
34
int fd_array[MAX_CLIENTS];
35
- int i, fd;
+ int fd;
36
37
//parse command line arguments
38
if(argc == 3){
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
75
if(FD_ISSET(fd, &tempset)){
76
if(fd == server_sockfd){
77
// accept new client connection request
78
- client_sockfd = accept(server_sockfd, (struct sockaddr *) &client_addr, &addrlen);
+ client_sockfd = accept(server_sockfd, (struct sockaddr *) &client_addr, (socklen_t *)&addrlen);
79
80
if(num_clients < MAX_CLIENTS){
81
FD_SET(client_sockfd, &readset);
0 commit comments