diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unit1305.c | 4 | ||||
-rw-r--r-- | tests/unit/unit1309.c | 12 |
2 files changed, 8 insertions, 8 deletions
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); |