aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-05-11 23:40:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-05-21 23:21:47 +0200
commitcb529b713f4882ac65a074ae8d87faa41d19168e (patch)
treeb9f23f33a817107127020630c7b9b5764e8685f0 /tests/unit
parentf3d836b73601fc6d14cb917e1cd72f43b9056dff (diff)
checksrc: make sure sizeof() is used *with* parentheses
... and unify the source code to adhere. Closes #2563
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unit1604.c4
-rw-r--r--tests/unit/unit1607.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/unit1604.c b/tests/unit/unit1604.c
index b414e03e5..fbfd2c423 100644
--- a/tests/unit/unit1604.c
+++ b/tests/unit/unit1604.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, 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
@@ -295,7 +295,7 @@ UNITTEST_START
size_t i;
- for(i = 0; i < sizeof data / sizeof data[0]; ++i) {
+ for(i = 0; i < sizeof(data) / sizeof(data[0]); ++i) {
char *output = NULL;
char *flagstr = NULL;
char *received_ccstr = NULL;
diff --git a/tests/unit/unit1607.c b/tests/unit/unit1607.c
index 71c59939b..697b8b5c4 100644
--- a/tests/unit/unit1607.c
+++ b/tests/unit/unit1607.c
@@ -120,7 +120,7 @@ UNITTEST_START
for(i = 0; i < testnum; ++i, curl_easy_reset(easy)) {
int j;
- int addressnum = sizeof tests[i].address / sizeof *tests[i].address;
+ int addressnum = sizeof(tests[i].address) / sizeof(*tests[i].address);
struct Curl_addrinfo *addr;
struct Curl_dns_entry *dns;
struct curl_slist *list;