@@ -63,7 +63,7 @@ static cpp::optional<char *> next_cstr() {
63
63
return cpp::nullopt;
64
64
}
65
65
66
- #define GET_VAL (op ) \
66
+ #define get_value (op ) \
67
67
__extension__ ({ \
68
68
auto val = op (); \
69
69
if (!val) \
@@ -103,10 +103,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
103
103
memcpy (global_buffer, data, size);
104
104
105
105
remaining = size;
106
- uint64_t size_a = GET_VAL (next_uint64) % 256 ;
107
- uint64_t size_b = GET_VAL (next_uint64) % 256 ;
108
- uint64_t rand_a = GET_VAL (next_uint64);
109
- uint64_t rand_b = GET_VAL (next_uint64);
106
+ uint64_t size_a = get_value (next_uint64) % 256 ;
107
+ uint64_t size_b = get_value (next_uint64) % 256 ;
108
+ uint64_t rand_a = get_value (next_uint64);
109
+ uint64_t rand_b = get_value (next_uint64);
110
110
internal::HashTable *table_a = internal::HashTable::allocate (size_a, rand_a);
111
111
register_cleanup (1 , [&table_a] {
112
112
if (table_a)
@@ -120,17 +120,17 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
120
120
if (!table_a || !table_b)
121
121
return 0 ;
122
122
for (;;) {
123
- Action action = GET_VAL (next_action);
123
+ Action action = get_value (next_action);
124
124
switch (action) {
125
125
case Action::Find: {
126
- const char *key = GET_VAL (next_cstr);
126
+ const char *key = get_value (next_cstr);
127
127
if (static_cast <bool >(table_a->find (key)) !=
128
128
static_cast <bool >(table_b->find (key)))
129
129
trap_with_message (key);
130
130
break ;
131
131
}
132
132
case Action::Insert: {
133
- char *key = GET_VAL (next_cstr);
133
+ char *key = get_value (next_cstr);
134
134
ENTRY *a = internal::HashTable::insert (table_a, ENTRY{key, key});
135
135
ENTRY *b = internal::HashTable::insert (table_b, ENTRY{key, key});
136
136
if (a->data != b->data )
0 commit comments