Address style issues.
[oweals/openssl.git] / test / x509aux.c
index 024bfc9004bb0c15b6880a8e1deb81bed1a74b6f..7bfacfda3aeb0684f74e8b028b1512d9d42591ad 100644 (file)
@@ -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;
         }