diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-19 09:00:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-19 08:43:51 +0000 |
| commit | 6ccb48f81a0242c3ba2ddd583ded0582364eeacd (patch) | |
| tree | 0ff7e4ea1f24ee4f6b3d60ccbaa7460f792879db /pkg/kfuzztest/testdata/common.h | |
| parent | d43aeb52dbe1775688e98706ff905e35487cfe3b (diff) | |
all: reformat C/C++ files
Diffstat (limited to 'pkg/kfuzztest/testdata/common.h')
| -rw-r--r-- | pkg/kfuzztest/testdata/common.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/pkg/kfuzztest/testdata/common.h b/pkg/kfuzztest/testdata/common.h index 29e8b193e..f1c1a0fba 100644 --- a/pkg/kfuzztest/testdata/common.h +++ b/pkg/kfuzztest/testdata/common.h @@ -12,8 +12,8 @@ #include <stdint.h> struct kfuzztest_target { - const char *name; - const char *arg_type_name; + const char* name; + const char* arg_type_name; uintptr_t write_input_cb; } __attribute__((aligned(32))); @@ -28,8 +28,8 @@ enum kfuzztest_constraint_type { }; struct kfuzztest_constraint { - const char *input_type; - const char *field_name; + const char* input_type; + const char* field_name; uintptr_t value1; uintptr_t value2; enum kfuzztest_constraint_type type; @@ -42,40 +42,40 @@ enum kfuzztest_annotation_attribute { }; struct kfuzztest_annotation { - const char *input_type; - const char *field_name; - const char *linked_field_name; + const char* input_type; + const char* field_name; + const char* linked_field_name; enum kfuzztest_annotation_attribute attrib; } __attribute__((aligned(32))); -#define DEFINE_FUZZ_TARGET(test_name, test_arg_type) \ - struct kfuzztest_target __fuzz_test__##test_name \ - __attribute__((section(".kfuzztest_target"), __used__)) = { \ - .name = #test_name, \ - .arg_type_name = #test_arg_type, \ - }; \ - /* Avoid the compiler optimizing out the struct definition. */ \ +#define DEFINE_FUZZ_TARGET(test_name, test_arg_type) \ + struct kfuzztest_target __fuzz_test__##test_name \ + __attribute__((section(".kfuzztest_target"), __used__)) = { \ + .name = #test_name, \ + .arg_type_name = #test_arg_type, \ + }; \ + /* Avoid the compiler optimizing out the struct definition. */ \ static test_arg_type arg; #define DEFINE_CONSTRAINT(arg_type, field, val1, val2, tpe) \ static struct kfuzztest_constraint __constraint_##arg_type##_##field \ - __attribute__((section(".kfuzztest_constraint"), \ - __used__)) = { \ - .input_type = "struct " #arg_type, \ - .field_name = #field, \ - .value1 = (uintptr_t)val1, \ - .value2 = (uintptr_t)val2, \ - .type = tpe, \ - } + __attribute__((section(".kfuzztest_constraint"), \ + __used__)) = { \ + .input_type = "struct " #arg_type, \ + .field_name = #field, \ + .value1 = (uintptr_t)val1, \ + .value2 = (uintptr_t)val2, \ + .type = tpe, \ + } #define DEFINE_ANNOTATION(arg_type, field, linked_field, attribute) \ static struct kfuzztest_annotation __annotation_##arg_type##_##field \ - __attribute__((section(".kfuzztest_annotation"), \ - __used__)) = { \ - .input_type = "struct " #arg_type, \ - .field_name = #field, \ - .linked_field_name = #linked_field, \ - .attrib = attribute, \ - } + __attribute__((section(".kfuzztest_annotation"), \ + __used__)) = { \ + .input_type = "struct " #arg_type, \ + .field_name = #field, \ + .linked_field_name = #linked_field, \ + .attrib = attribute, \ + } #endif /* COMMON_H */ |
