Fix if statement for argument count

Otherwise you would have to provide a second "fake" argument to properly
set the desired port range.
This commit is contained in:
Christoph Grabo 2014-03-04 19:43:31 +01:00
parent 6c6f92fec3
commit 3f37b2b6d1
1 changed files with 1 additions and 3 deletions

View File

@ -28,7 +28,7 @@ int main(int argc, char **argv){
socklen_t optlen;
int connections = 0;
int base_port = 7000;
if(argc > 2){
if(argc >= 2){
base_port = atoi(argv[1]);
}
@ -110,5 +110,3 @@ sock_err:
printf("error: %s\n", strerror(errno));
return 0;
}