less hardcoded sizes and more ARRAYLEN
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "../crypto.h"
|
||||
#include "../dump.h"
|
||||
#include "util_posix.h"
|
||||
#include "commonutil.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -312,7 +313,7 @@ int exec_crypto_test(bool verbose) {
|
||||
}
|
||||
fprintf(stdout, "Crypto raw test: passed\n\n");
|
||||
|
||||
for (i = 0; i < sizeof(keylengths) / sizeof(keylengths[0]); i++) {
|
||||
for (i = 0; i < ARRAYLEN(keylengths); i++) {
|
||||
unsigned int kl = keylengths[i];
|
||||
ret = test_genkey(kl, message, kl / 8, verbose);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user