diff options
author | Pauli <paul.dale@oracle.com> | 2017-06-20 07:58:51 +1000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-19 22:37:16 -0400 |
commit | 4f58c6b9febddb5bb074dff44bdc4c013cdb9544 (patch) | |
tree | df2cbb1d368001abcffe0e21c89d5ed9e453aecb /test | |
parent | a7b68c5b246dcad44270c321d6734b0a10c2633d (diff) |
Address style issues.
Refactor count -> c which makes the for loop more readable.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3710)
Diffstat (limited to 'test')
-rw-r--r-- | test/x509aux.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/x509aux.c b/test/x509aux.c index 024bfc9004..7bfacfda3a 100644 --- a/test/x509aux.c +++ b/test/x509aux.c @@ -25,7 +25,7 @@ static char **files; static int test_certs(int num) { - int count; + int c; char *name = 0; char *header = 0; unsigned char *data = 0; @@ -38,10 +38,9 @@ static int test_certs(int num) if (!TEST_ptr(fp)) return 0; - for (count = 0; - !err && PEM_read_bio(fp, &name, &header, &data, &len); - ++count) { - int trusted = strcmp(name, PEM_STRING_X509_TRUSTED) == 0; + for (c = 0; !err && PEM_read_bio(fp, &name, &header, &data, &len); ++c) { + const int trusted = (strcmp(name, PEM_STRING_X509_TRUSTED) == 0); + d2i_X509_t d2i = trusted ? d2i_X509_AUX : d2i_X509; i2d_X509_t i2d = trusted ? i2d_X509_AUX : i2d_X509; X509 *cert = NULL; @@ -147,7 +146,7 @@ static int test_certs(int num) if (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) { /* Reached end of PEM file */ - if (count > 0) { + if (c > 0) { ERR_clear_error(); return 1; } |