Changed a variable name for clarification
This commit is contained in:
parent
36b884e0ba
commit
8c1009cea3
@ -40,7 +40,7 @@ int main(int argc, char *argv[])
|
||||
int flag = 1;
|
||||
int sockfd = 0, connfd = 0;
|
||||
int port = 10800;
|
||||
uint32_t addr = INADDR_ANY;
|
||||
uint32_t address = INADDR_ANY;
|
||||
struct sockaddr_in sock;
|
||||
|
||||
struct sockaddr_in client;
|
||||
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
if(inet_pton(AF_INET, optarg, &addr) == -1){
|
||||
if(inet_pton(AF_INET, optarg, &address) == -1){
|
||||
fprintf(stderr, "%s: invalid bind address\n", exec_name);
|
||||
print_help();
|
||||
goto shutdown_error;
|
||||
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
memset(&sock, 0, sizeof(sock));
|
||||
sock.sin_family = AF_INET;
|
||||
sock.sin_addr.s_addr = addr;
|
||||
sock.sin_addr.s_addr = address;
|
||||
sock.sin_port = htons(port);
|
||||
|
||||
// Bind our socket to the specified address and port
|
||||
|
Loading…
Reference in New Issue
Block a user