aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/first.c2
-rw-r--r--tests/libtest/lib1501.c4
-rw-r--r--tests/libtest/lib1502.c4
-rw-r--r--tests/libtest/lib1506.c2
-rw-r--r--tests/libtest/lib1507.c4
-rw-r--r--tests/libtest/lib1515.c4
-rw-r--r--tests/libtest/lib1531.c4
-rw-r--r--tests/libtest/lib1900.c4
-rw-r--r--tests/libtest/lib502.c4
-rw-r--r--tests/libtest/lib503.c4
-rw-r--r--tests/libtest/lib504.c4
-rw-r--r--tests/libtest/lib507.c4
-rw-r--r--tests/libtest/lib525.c4
-rw-r--r--tests/libtest/lib526.c2
-rw-r--r--tests/libtest/lib530.c2
-rw-r--r--tests/libtest/lib533.c2
-rw-r--r--tests/libtest/lib536.c4
-rw-r--r--tests/libtest/lib540.c2
-rw-r--r--tests/libtest/lib552.c20
-rw-r--r--tests/libtest/lib555.c2
-rw-r--r--tests/libtest/lib557.c1
-rw-r--r--tests/libtest/lib560.c4
-rw-r--r--tests/libtest/lib564.c4
-rw-r--r--tests/libtest/lib571.c2
-rw-r--r--tests/libtest/lib573.c4
-rw-r--r--tests/libtest/lib575.c4
-rw-r--r--tests/libtest/lib591.c4
-rw-r--r--tests/libtest/lib597.c6
-rw-r--r--tests/libtest/libntlmconnect.c4
-rw-r--r--tests/libtest/testtrace.c22
-rw-r--r--tests/server/fake_ntlm.c3
-rw-r--r--tests/server/getpart.c12
-rw-r--r--tests/server/rtspd.c6
-rw-r--r--tests/server/sws.c8
-rw-r--r--tests/server/tftpd.c2
-rw-r--r--tests/unit/unit1305.c4
-rw-r--r--tests/unit/unit1309.c12
37 files changed, 95 insertions, 89 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 706d853ca..86d84cacd 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -118,7 +118,7 @@ static void memory_tracking_init(void)
/* returns a hexdump in a static memory area */
char *hexdump(const unsigned char *buffer, size_t len)
{
- static char dump[200*3+1];
+ static char dump[200 * 3 + 1];
char *p = dump;
size_t i;
if(len > 200)
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
index 8a6ef5172..96094d699 100644
--- a/tests/libtest/lib1501.c
+++ b/tests/libtest/lib1501.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -78,7 +78,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index bd555cbaf..188c120f8 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -99,7 +99,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c
index 687437636..d456bc95c 100644
--- a/tests/libtest/lib1506.c
+++ b/tests/libtest/lib1506.c
@@ -112,7 +112,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
index cd8500195..5e3a5926a 100644
--- a/tests/libtest/lib1507.c
+++ b/tests/libtest/lib1507.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -118,7 +118,7 @@ int test(char *URL)
case of (maxfd == -1), we call select(0, ...), which is basically equal
to sleep. */
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
if(tutil_tvdiff(tutil_tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
fprintf(stderr, "ABORTING TEST, since it seems "
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 4b41dc2e4..39bccc59b 100644
--- a/tests/libtest/lib1515.c
+++ b/tests/libtest/lib1515.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -87,7 +87,7 @@ static int do_one_request(CURLM *m, char *URL, char *resolve)
timeout.tv_usec = 0;
multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
multi_perform(m, &still_running);
diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c
index e203baba1..5ee617e52 100644
--- a/tests/libtest/lib1531.c
+++ b/tests/libtest/lib1531.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -115,7 +115,7 @@ int test(char *URL)
else {
/* Note that on some platforms 'timeout' may be modified by select().
If you need access to the original value save a copy beforehand. */
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
}
switch(rc) {
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
index cac1dd1d9..468c12ffa 100644
--- a/tests/libtest/lib1900.c
+++ b/tests/libtest/lib1900.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2013 - 2016, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2013 - 2017, Linus Nielsen Feltzing, <linus@haxx.se>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -229,7 +229,7 @@ int test(char *URL)
interval.tv_sec = 0;
interval.tv_usec = 1000;
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c
index 7cf6415a6..ce4bc47d1 100644
--- a/tests/libtest/lib502.c
+++ b/tests/libtest/lib502.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -73,7 +73,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c
index 2eb287483..15b45f95b 100644
--- a/tests/libtest/lib503.c
+++ b/tests/libtest/lib503.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -83,7 +83,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c
index 3466dc948..771b2038a 100644
--- a/tests/libtest/lib504.c
+++ b/tests/libtest/lib504.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -95,7 +95,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index ebe897ac8..9cd47ccd5 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -70,7 +70,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index 715b7fbe2..c179960c1 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -132,7 +132,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index 5e41cc0a1..42eb7cb18 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -133,7 +133,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c
index e7726fbc3..7b71fa5e8 100644
--- a/tests/libtest/lib530.c
+++ b/tests/libtest/lib530.c
@@ -101,7 +101,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c
index ceb71bf7b..7dd0fb59c 100644
--- a/tests/libtest/lib533.c
+++ b/tests/libtest/lib533.c
@@ -95,7 +95,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c
index f3ba5734c..e6943626d 100644
--- a/tests/libtest/lib536.c
+++ b/tests/libtest/lib536.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -63,7 +63,7 @@ static int perform(CURLM *multi)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res_select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+ res_select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &interval);
if(res)
return res;
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index 61f635f69..a13653ce6 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -152,7 +152,7 @@ static int loop(int num, CURLM *cm, const char *url, const char *userpwd,
T.tv_usec = 0;
}
- res_select_test(M+1, &R, &W, &E, &T);
+ res_select_test(M + 1, &R, &W, &E, &T);
if(res)
return res;
}
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index e42ba34f9..5082eb044 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -48,30 +48,32 @@ void dump(const char *text,
fprintf(stream, "%s, %d bytes (0x%x)\n", text, (int)size, (int)size);
- for(i = 0; i<size; i+= width) {
+ for(i = 0; i<size; i += width) {
fprintf(stream, "%04x: ", (int)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
- if(i+c < size)
- fprintf(stream, "%02x ", ptr[i+c]);
+ if(i + c < size)
+ fprintf(stream, "%02x ", ptr[i + c]);
else
fputs(" ", stream);
}
- for(c = 0; (c < width) && (i+c < size); c++) {
+ for(c = 0; (c < width) && (i + c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
- if(nohex && (i+c+1 < size) && ptr[i+c] == 0x0D && ptr[i+c+1] == 0x0A) {
- i+=(c+2-width);
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
break;
}
fprintf(stream, "%c",
- (ptr[i+c] >= 0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)? ptr[i + c] : '.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
- if(nohex && (i+c+2 < size) && ptr[i+c+1] == 0x0D && ptr[i+c+2] == 0x0A) {
- i+=(c+3-width);
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
break;
}
}
diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
index 464f6e0b0..fc71bb643 100644
--- a/tests/libtest/lib555.c
+++ b/tests/libtest/lib555.c
@@ -141,7 +141,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c
index df63d9c6b..9a87fbda9 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -1546,6 +1546,7 @@ static int test_weird_arguments(void)
}
/* DBL_MAX value from Linux */
+/* !checksrc! disable PLUSNOSPACE 1 */
#define MAXIMIZE -1.7976931348623157081452E+308
static int test_float_formatting(void)
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index 8fa0c2de2..0093ea113 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -91,7 +91,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c
index 1822931bc..f959f2043 100644
--- a/tests/libtest/lib564.c
+++ b/tests/libtest/lib564.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -76,7 +76,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &rd, &wr, &exc, &interval);
+ select_test(maxfd + 1, &rd, &wr, &exc, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index 21aa267b7..70524f2f2 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -70,7 +70,7 @@ static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream)
}
data += 4;
- for(i = 0; i < message_size; i+= RTP_DATA_SIZE) {
+ for(i = 0; i < message_size; i += RTP_DATA_SIZE) {
if(message_size - i > RTP_DATA_SIZE) {
if(memcmp(RTP_DATA, data + i, RTP_DATA_SIZE) != 0) {
printf("RTP PAYLOAD CORRUPTED [%s]\n", data + i);
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index dce198b50..eb817b1ed 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -88,7 +88,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c
index 186170cfc..6baa12229 100644
--- a/tests/libtest/lib575.c
+++ b/tests/libtest/lib575.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -93,7 +93,7 @@ int test(char *URL)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
abort_on_test_timeout();
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
index 53ede3fcd..f25cc4d73 100644
--- a/tests/libtest/lib591.c
+++ b/tests/libtest/lib591.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -123,7 +123,7 @@ int test(char *URL)
interval.tv_usec = 100000L; /* 100 ms */
}
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c
index bace92cbe..c8529743e 100644
--- a/tests/libtest/lib597.c
+++ b/tests/libtest/lib597.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -120,11 +120,11 @@ int test(char *URL)
interval.tv_usec = (itimeout%1000)*1000;
}
else {
- interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+ interval.tv_sec = TEST_HANG_TIMEOUT/1000 + 1;
interval.tv_usec = 0;
}
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index ad20e8b8f..0d527a779 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -196,7 +196,7 @@ int test(char *url)
interval.tv_usec = (itimeout%1000)*1000;
}
else {
- interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+ interval.tv_sec = TEST_HANG_TIMEOUT/1000 + 1;
interval.tv_usec = 0;
/* if there's no timeout and we get here on the last handle, we may
@@ -207,7 +207,7 @@ int test(char *url)
}
}
- select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+ select_test(maxfd + 1, &fdread, &fdwrite, &fdexcep, &interval);
abort_on_test_timeout();
}
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 62641e15c..5c68b3b1b 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -53,25 +53,27 @@ void libtest_debug_dump(const char *timebuf, const char *text, FILE *stream,
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
- if(i+c < size)
- fprintf(stream, "%02x ", ptr[i+c]);
+ if(i + c < size)
+ fprintf(stream, "%02x ", ptr[i + c]);
else
fputs(" ", stream);
}
- for(c = 0; (c < width) && (i+c < size); c++) {
+ for(c = 0; (c < width) && (i + c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if(nohex &&
- (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) {
- i += (c+2-width);
+ (i + c + 1 < size) && (ptr[i + c] == 0x0D) &&
+ (ptr[i + c + 1] == 0x0A)) {
+ i += (c + 2 - width);
break;
}
- fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ?
- ptr[i+c] : '.');
+ fprintf(stream, "%c", ((ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80)) ?
+ ptr[i + c] : '.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if(nohex &&
- (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) {
- i += (c+3-width);
+ (i + c + 2 < size) && (ptr[i + c + 1] == 0x0D) &&
+ (ptr[i + c + 2] == 0x0A)) {
+ i += (c + 3 - width);
break;
}
}
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index 2d547ffae..ca2b438b6 100644
--- a/tests/server/fake_ntlm.c
+++ b/tests/server/fake_ntlm.c
@@ -63,7 +63,8 @@ static char *printable(char *inbuf, size_t inlength)
inlength = strlen(inbuf);
if(inlength) {
- outincr = ((inlength/2) < (HEX_STR_LEN+1)) ? HEX_STR_LEN+1 : inlength/2;
+ outincr = ((inlength/2) < (HEX_STR_LEN + 1)) ?
+ HEX_STR_LEN + 1 : inlength/2;
outsize = inlength + outincr;
}
else
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index bb8351bc3..b97ad2e66 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -250,11 +250,11 @@ int getpart(char **outbuf, size_t *outlen,
const char *main, const char *sub, FILE *stream)
{
# define MAX_TAG_LEN 79
- char couter[MAX_TAG_LEN+1]; /* current outermost section */
- char cmain[MAX_TAG_LEN+1]; /* current main section */
- char csub[MAX_TAG_LEN+1]; /* current sub section */
- char ptag[MAX_TAG_LEN+1]; /* potential tag */
- char patt[MAX_TAG_LEN+1]; /* potential attributes */
+ char couter[MAX_TAG_LEN + 1]; /* current outermost section */
+ char cmain[MAX_TAG_LEN + 1]; /* current main section */
+ char csub[MAX_TAG_LEN + 1]; /* current sub section */
+ char ptag[MAX_TAG_LEN + 1]; /* potential tag */
+ char patt[MAX_TAG_LEN + 1]; /* potential attributes */
char *buffer = NULL;
char *ptr;
char *end;
diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c
index 8f004e120..53ffeb6e1 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -500,7 +500,7 @@ static int ProcessRequest(struct httprequest *req)
SET_RTP_PKT_LEN(rtp_scratch, rtp_size);
/* Fill it with junk data */
- for(i = 0; i < rtp_size; i+= RTP_DATA_SIZE) {
+ for(i = 0; i < rtp_size; i += RTP_DATA_SIZE) {
memcpy(rtp_scratch + 4 + i, RTP_DATA, RTP_DATA_SIZE);
}
@@ -554,8 +554,8 @@ static int ProcessRequest(struct httprequest *req)
/* if the host name starts with test, the port number used in the
CONNECT line will be used as test number! */
char *portp = strchr(doc, ':');
- if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
- req->testno = strtol(portp+1, NULL, 10);
+ if(portp && (*(portp + 1) != '\0') && ISDIGIT(*(portp + 1)))
+ req->testno = strtol(portp + 1, NULL, 10);
else
req->testno = DOCNUMBER_CONNECT;
}
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 5fcd6732b..993fefcf7 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -578,18 +578,18 @@ static int ProcessRequest(struct httprequest *req)
}
if(*p != ']')
logmsg("Invalid CONNECT IPv6 address format");
- else if(*(p+1) != ':')
+ else if(*(p + 1) != ':')
logmsg("Invalid CONNECT IPv6 port format");
else
- portp = p+1;
+ portp = p + 1;
req->testno = part;
}
else
portp = strchr(doc, ':');
- if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1))) {
- unsigned long ulnum = strtoul(portp+1, NULL, 10);
+ if(portp && (*(portp + 1) != '\0') && ISDIGIT(*(portp + 1))) {
+ unsigned long ulnum = strtoul(portp + 1, NULL, 10);
if(!ulnum || (ulnum > 65535UL))
logmsg("Invalid CONNECT port received");
else
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 1932ea411..a8b565197 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -992,7 +992,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
/* before increasing pointer, make sure it is still within the legal
space */
- if((cp+1) < &buf.storage[size]) {
+ if((cp + 1) < &buf.storage[size]) {
++cp;
if(first) {
/* store the mode since we need it later */
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
index b958d0434..6e4bbb861 100644
--- a/tests/unit/unit1305.c
+++ b/tests/unit/unit1305.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -130,7 +130,7 @@ UNITTEST_START
key_len = strlen(data_key);
data_node->inuse = 1; /* hash will hold the reference */
- nodep = Curl_hash_add(&hp, data_key, key_len+1, data_node);
+ nodep = Curl_hash_add(&hp, data_key, key_len + 1, data_node);
abort_unless(nodep, "insertion into hash failed");
/* Freeing will now be done by Curl_hash_destroy */
data_node = NULL;
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
index cb533e70b..c53cbcbce 100644
--- a/tests/unit/unit1309.c
+++ b/tests/unit/unit1309.c
@@ -42,7 +42,7 @@ static void splayprint(struct Curl_tree * t, int d, char output)
if(t == NULL)
return;
- splayprint(t->larger, d+1, output);
+ splayprint(t->larger, d + 1, output);
for(i = 0; i<d; i++)
if(output)
printf(" ");
@@ -62,7 +62,7 @@ static void splayprint(struct Curl_tree * t, int d, char output)
printf("\n");
}
- splayprint(t->smaller, d+1, output);
+ splayprint(t->smaller, d + 1, output);
}
UNITTEST_START
@@ -94,7 +94,7 @@ UNITTEST_START
splayprint(root, 0, 1);
for(i = 0; i < NUM_NODES; i++) {
- int rem = (i+7)%NUM_NODES;
+ int rem = (i + 7)%NUM_NODES;
printf("Tree look:\n");
splayprint(root, 0, 1);
printf("remove pointer %d, payload %ld\n", rem,
@@ -119,13 +119,13 @@ UNITTEST_START
/* add some nodes with the same key */
for(j = 0; j <= i % 3; j++) {
size_t payload = key.tv_usec*10 + j;
- nodes[i*3+j].payload = (void *)payload; /* for simplicity */
- root = Curl_splayinsert(key, root, &nodes[i*3+j]);
+ nodes[i * 3 + j].payload = (void *)payload; /* for simplicity */
+ root = Curl_splayinsert(key, root, &nodes[i * 3 + j]);
}
}
removed = NULL;
- for(i = 0; i <= 1100; i+= 100) {
+ for(i = 0; i <= 1100; i += 100) {
printf("Removing nodes not larger than %d\n", i);
tv_now.tv_usec = i;
root = Curl_splaygetbest(tv_now, root, &removed);