Unmerged?
This commit is contained in:
commit
0227173a72
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ int get_empty( user ** list, int amount ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main( int argc, char * argv[] ) {
|
int main( int argc, char * argv[] ) {
|
||||||
if (argc != 4) { std::cout << "Not the right amount of arguments!\n"; exit(1);}
|
if (argc < 3) { std::cout << "Not the right amount of arguments!\n"; exit(1);}
|
||||||
int buffers = atoi(argv[1]);
|
int buffers = atoi(argv[1]);
|
||||||
int total_buffersize = atoi(argv[2]);
|
int total_buffersize = atoi(argv[2]);
|
||||||
int size_per_buffer = total_buffersize/buffers;
|
int size_per_buffer = total_buffersize/buffers;
|
||||||
|
@ -28,7 +28,7 @@ int main( int argc, char * argv[] ) {
|
||||||
ringbuf[i]->data = (char*) malloc(size_per_buffer);
|
ringbuf[i]->data = (char*) malloc(size_per_buffer);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < buffers; i ++ ) { std::cout << "Buffer[" << i << "][0]: " << ringbuf[i]->data[0] << "\n"; }
|
for (int i = 0; i < buffers; i ++ ) { std::cout << "Buffer[" << i << "][0]: " << ringbuf[i]->data[0] << "\n"; }
|
||||||
int connections = atoi(argv[3]);
|
int connections = 2;
|
||||||
user ** connectionList = (user**) calloc (connections,sizeof(user*));
|
user ** connectionList = (user**) calloc (connections,sizeof(user*));
|
||||||
for (int i = 0; i < connections; i++) { connectionList[i] = new user; }
|
for (int i = 0; i < connections; i++) { connectionList[i] = new user; }
|
||||||
char input[BUFLEN];
|
char input[BUFLEN];
|
||||||
|
|
Loading…
Add table
Reference in a new issue