Skip to content

Commit 5a72c4d

Browse files
make style consistent
1 parent 9d681e1 commit 5a72c4d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libc/fuzzing/__support/hashtable_fuzz.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static cpp::optional<char *> next_cstr() {
6363
return cpp::nullopt;
6464
}
6565

66-
#define GET_VAL(op) \
66+
#define get_value(op) \
6767
__extension__({ \
6868
auto val = op(); \
6969
if (!val) \
@@ -103,10 +103,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
103103
memcpy(global_buffer, data, size);
104104

105105
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);
110110
internal::HashTable *table_a = internal::HashTable::allocate(size_a, rand_a);
111111
register_cleanup(1, [&table_a] {
112112
if (table_a)
@@ -120,17 +120,17 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
120120
if (!table_a || !table_b)
121121
return 0;
122122
for (;;) {
123-
Action action = GET_VAL(next_action);
123+
Action action = get_value(next_action);
124124
switch (action) {
125125
case Action::Find: {
126-
const char *key = GET_VAL(next_cstr);
126+
const char *key = get_value(next_cstr);
127127
if (static_cast<bool>(table_a->find(key)) !=
128128
static_cast<bool>(table_b->find(key)))
129129
trap_with_message(key);
130130
break;
131131
}
132132
case Action::Insert: {
133-
char *key = GET_VAL(next_cstr);
133+
char *key = get_value(next_cstr);
134134
ENTRY *a = internal::HashTable::insert(table_a, ENTRY{key, key});
135135
ENTRY *b = internal::HashTable::insert(table_b, ENTRY{key, key});
136136
if (a->data != b->data)

0 commit comments

Comments
 (0)