1
0
Fork 0

Changed a variable name for clarification

This commit is contained in:
Christopher Ramey 2015-02-04 00:39:28 +00:00 committed by cdramey
parent 36b884e0ba
commit 8c1009cea3
1 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ int main(int argc, char *argv[])
int flag = 1; int flag = 1;
int sockfd = 0, connfd = 0; int sockfd = 0, connfd = 0;
int port = 10800; int port = 10800;
uint32_t addr = INADDR_ANY; uint32_t address = INADDR_ANY;
struct sockaddr_in sock; struct sockaddr_in sock;
struct sockaddr_in client; struct sockaddr_in client;
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
break; break;
case 'b': 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); fprintf(stderr, "%s: invalid bind address\n", exec_name);
print_help(); print_help();
goto shutdown_error; goto shutdown_error;
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
memset(&sock, 0, sizeof(sock)); memset(&sock, 0, sizeof(sock));
sock.sin_family = AF_INET; sock.sin_family = AF_INET;
sock.sin_addr.s_addr = addr; sock.sin_addr.s_addr = address;
sock.sin_port = htons(port); sock.sin_port = htons(port);
// Bind our socket to the specified address and port // Bind our socket to the specified address and port