perf: reduced variables scope
@@ -2294,7 +2294,6 @@ print_times(struct variant_s *variant_list, struct params_s *params,
"SNOW_V_AEAD"
};
struct params_s par;
- uint8_t c_mode, c_dir, h_alg;
printf("ARCH");
for (col = 0; col < total_variants; col++)
@@ -2303,21 +2302,27 @@ print_times(struct variant_s *variant_list, struct params_s *params,
printf("CIPHER");
for (col = 0; col < total_variants; col++) {
par = variant_list[col].params;
- c_mode = par.cipher_mode - TEST_CBC;
+
+ const uint8_t c_mode = par.cipher_mode - TEST_CBC;
+
printf("\t%s", c_mode_names[c_mode]);
}
printf("\n");
printf("DIR");
for (col = 0; col < total_variants; col++) {
par = variant_list[col].params;
- c_dir = par.cipher_dir - IMB_DIR_ENCRYPT;
+
+ const uint8_t c_dir = par.cipher_dir - IMB_DIR_ENCRYPT;
+
printf("\t%s", c_dir_names[c_dir]);
}
printf("\n");
printf("HASH_ALG");
for (col = 0; col < total_variants; col++) {
par = variant_list[col].params;
- h_alg = par.hash_alg - TEST_SHA1;
+
+ const uint8_t h_alg = par.hash_alg - TEST_SHA1;
+
printf("\t%s", h_alg_names[h_alg]);
}
printf("\n");
