diff options
Diffstat (limited to 'crypto/openssl/test/stack_test.c')
| -rw-r--r-- | crypto/openssl/test/stack_test.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/crypto/openssl/test/stack_test.c b/crypto/openssl/test/stack_test.c index d44e6fc93a30..2175387c0844 100644 --- a/crypto/openssl/test/stack_test.c +++ b/crypto/openssl/test/stack_test.c @@ -61,23 +61,23 @@ static int test_int_stack(int reserve) int sorted; int ex; } finds[] = { - { 2, 1, 5, 5 }, - { 9, 7, 6, 6 }, - { -173, 5, 0, 0 }, - { 999, 3, 8, 8 }, - { 0, -1, -1, 1 } + { 2, 1, 5, 5 }, + { 9, 7, 6, 6 }, + { -173, 5, 0, 0 }, + { 999, 3, 8, 8 }, + { 0, -1, -1, 1 } }; const int n_finds = OSSL_NELEM(finds); static struct { int value; int ex; } exfinds[] = { - { 3, 5 }, - { 1000, 8 }, - { 20, 8 }, - { -999, 0 }, - { -5, 0 }, - { 8, 5 } + { 3, 5 }, + { 1000, 8 }, + { 20, 8 }, + { -999, 0 }, + { -5, 0 }, + { 8, 5 } }; const int n_exfinds = OSSL_NELEM(exfinds); STACK_OF(sint) *s = sk_sint_new_null(); @@ -166,7 +166,7 @@ end: } static int uchar_compare(const unsigned char *const *a, - const unsigned char *const *b) + const unsigned char *const *b) { return **a - (signed int)**b; } @@ -264,7 +264,8 @@ static SS *SS_copy(const SS *p) return q; } -static void SS_free(SS *p) { +static void SS_free(SS *p) +{ OPENSSL_free(p); } @@ -329,8 +330,8 @@ static int test_SS_stack(void) SS_free(p); if (!TEST_int_eq(sk_SS_num(s), n - 1)) goto end; - for (i = 0; i < n-1; i++) - if (!TEST_ptr_eq(sk_SS_value(s, i), v[i<3 ? i : 1+i])) { + for (i = 0; i < n - 1; i++) + if (!TEST_ptr_eq(sk_SS_value(s, i), v[i < 3 ? i : 1 + i])) { TEST_info("SS delete ptr item %d", i); goto end; } @@ -367,7 +368,7 @@ static int test_SU_stack(void) /* check the pointers are correct */ for (i = 0; i < n; i++) - if (!TEST_ptr_eq(sk_SU_value(s, i), v + i)) { + if (!TEST_ptr_eq(sk_SU_value(s, i), v + i)) { TEST_info("SU pointer check %d", i); goto end; } |
