diff options
Diffstat (limited to 'crypto/openssl/fuzz/hashtable.c')
| -rw-r--r-- | crypto/openssl/fuzz/hashtable.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crypto/openssl/fuzz/hashtable.c b/crypto/openssl/fuzz/hashtable.c index 38d22950763e..5e168aad3e78 100644 --- a/crypto/openssl/fuzz/hashtable.c +++ b/crypto/openssl/fuzz/hashtable.c @@ -52,13 +52,13 @@ static HT *fuzzer_table = NULL; /* * Operational values */ -#define OP_INSERT 0 -#define OP_DELETE 1 -#define OP_LOOKUP 2 -#define OP_FLUSH 3 +#define OP_INSERT 0 +#define OP_DELETE 1 +#define OP_LOOKUP 2 +#define OP_FLUSH 3 #define OP_FOREACH 4 -#define OP_FILTER 5 -#define OP_END 6 +#define OP_FILTER 5 +#define OP_END 6 #define OP_MASK 0x3f #define INSERT_REPLACE_MASK 0x40 @@ -99,7 +99,7 @@ static void fuzz_free_cb(HT_VALUE *v) int FuzzerInitialize(int *argc, char ***argv) { - HT_CONFIG fuzz_conf = {NULL, fuzz_free_cb, NULL, 0, 1}; + HT_CONFIG fuzz_conf = { NULL, fuzz_free_cb, NULL, 0, 1 }; OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ERR_clear_error(); @@ -152,7 +152,7 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len) /* * Now do our operation */ - switch(OPERATION(op_flags)) { + switch (OPERATION(op_flags)) { case OP_INSERT: valptr = &prediction_table[keyval]; @@ -183,10 +183,10 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len) */ if (IS_REPLACE(op_flags)) rc = ossl_ht_fz_FUZZER_VALUE_insert(fuzzer_table, TO_HT_KEY(&key), - valptr, &lval); + valptr, &lval); else rc = ossl_ht_fz_FUZZER_VALUE_insert(fuzzer_table, TO_HT_KEY(&key), - valptr, NULL); + valptr, NULL); if (rc == -1) /* failed to grow the hash table due to too many collisions */ @@ -323,7 +323,7 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len) case OP_FLUSH: /* - * only flush the table rarely + * only flush the table rarely */ if ((flushes % 100000) != 1) { skipped_values++; @@ -341,7 +341,7 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len) /* * now check to make sure everything is free */ - for (i = 0; i < USHRT_MAX; i++) + for (i = 0; i < USHRT_MAX; i++) OPENSSL_assert((prediction_table[i].flags & FZ_FLAG_ALLOCATED) == 0); /* good flush */ |
