diff --git a/test/test.c b/test/test.c index fd3b951..b2dbadf 100644 --- a/test/test.c +++ b/test/test.c @@ -35,9 +35,6 @@ void *get_in_addr (struct sockaddr *sa) { } void test_file(const char* filename, size_t recv_buf_size) { - if (recv_buf_size <= 0) - recv_buf_size = RECV_BUF_SIZE; - char buf[CONT_BUF_SIZE + RECV_BUF_SIZE]; // cont buf + recv buf: [ ccrrrr] char *recvbuf = buf + CONT_BUF_SIZE; // recv buf: ^^^^ size_t nbytes; @@ -55,9 +52,6 @@ void test_file(const char* filename, size_t recv_buf_size) { } void test_server(const char* port, size_t recv_buf_size) { - if (recv_buf_size <= 0) - recv_buf_size = RECV_BUF_SIZE; - char buf[CONT_BUF_SIZE + RECV_BUF_SIZE]; // cont buf + recv buf: [ ccrrrr] char *recvbuf = buf + CONT_BUF_SIZE; // recv buf: ^^^^ diff --git a/test/testPsyc.c b/test/testPsyc.c index 0f102a6..2595642 100644 --- a/test/testPsyc.c +++ b/test/testPsyc.c @@ -40,7 +40,7 @@ int main (int argc, char **argv) { no_render = opts && memchr(opts, (int)'n', strlen(opts)); progress = opts && memchr(opts, (int)'p', strlen(opts)); file = opts && memchr(opts, (int)'f', strlen(opts)); - size_t recv_buf_size = argc > 3 ? atoi(argv[3]) : 0; + size_t recv_buf_size = argc > 3 ? atoi(argv[3]) : RECV_BUF_SIZE; if (file) test_file(argv[1], recv_buf_size);