summaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-09 23:55:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-11 09:29:50 +0200
commite5743f08e7efb387bb39c0dc28f36838ece3bc1e (patch)
treeb0237e17762f3be2bb6f8cf53fea1491a2c731ad /tests/libtest
parentca86006debc4570bbb3eacb71965c9d59be14084 (diff)
downloadcurl-e5743f08e7efb387bb39c0dc28f36838ece3bc1e.tar.gz
code style: use spaces around pluses
Diffstat (limited to 'tests/libtest')
-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
30 files changed, 71 insertions, 66 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;
}
}