From 52581c718c5cd55595ca032a56f1e194c5716456 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 May 2022 15:49:08 +0200 Subject: Clean up header guards that don't match their file name Header guard symbols should match their file name to make guard collisions less likely. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by: Markus Armbruster Message-Id: <20220506134911.2856099-2-armbru@redhat.com> Reviewed-by: Richard Henderson [Change to generated file ebpf/rss.bpf.skeleton.h backed out] --- tests/qtest/fuzz/fuzz.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/qtest/fuzz/fuzz.h b/tests/qtest/fuzz/fuzz.h index c5f0b72..327c1c5 100644 --- a/tests/qtest/fuzz/fuzz.h +++ b/tests/qtest/fuzz/fuzz.h @@ -11,8 +11,8 @@ * */ -#ifndef FUZZER_H_ -#define FUZZER_H_ +#ifndef QTEST_FUZZ_H +#define QTEST_FUZZ_H #include "qemu/units.h" #include "qapi/error.h" @@ -122,4 +122,3 @@ int LLVMFuzzerTestOneInput(const unsigned char *Data, size_t Size); int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp); #endif - -- cgit v1.1 From 9c0928045ce4b97fc59cb285b7a4b559d21e5da0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 May 2022 15:49:09 +0200 Subject: Clean up ill-advised or unusual header guards Leading underscores are ill-advised because such identifiers are reserved. Trailing underscores are merely ugly. Strip both. Our header guards commonly end in _H. Normalize the exceptions. Macros should be ALL_CAPS. Normalize the exception. Done with scripts/clean-header-guards.pl. include/hw/xen/interface/ and tools/virtiofsd/ left alone, because these were imported from Xen and libfuse respectively. Signed-off-by: Markus Armbruster Message-Id: <20220506134911.2856099-3-armbru@redhat.com> Reviewed-by: Richard Henderson --- tests/qtest/libqmp.h | 7 ++++--- tests/qtest/migration-helpers.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/qtest/libqmp.h b/tests/qtest/libqmp.h index 94aa973..5cb7eea 100644 --- a/tests/qtest/libqmp.h +++ b/tests/qtest/libqmp.h @@ -14,8 +14,9 @@ * See the COPYING file in the top-level directory. * */ -#ifndef LIBQMP_H_ -#define LIBQMP_H_ + +#ifndef LIBQMP_H +#define LIBQMP_H #include "qapi/qmp/qdict.h" @@ -47,4 +48,4 @@ bool qmp_rsp_is_err(QDict *rsp); */ void qmp_expect_error_and_unref(QDict *rsp, const char *class); -#endif /* LIBQMP_H_ */ +#endif /* LIBQMP_H */ diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h index c7872e8..2731399 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -9,8 +9,9 @@ * See the COPYING file in the top-level directory. * */ -#ifndef MIGRATION_HELPERS_H_ -#define MIGRATION_HELPERS_H_ + +#ifndef MIGRATION_HELPERS_H +#define MIGRATION_HELPERS_H #include "libqtest.h" @@ -34,4 +35,4 @@ void wait_for_migration_complete(QTestState *who); void wait_for_migration_fail(QTestState *from, bool allow_active); -#endif /* MIGRATION_HELPERS_H_ */ +#endif /* MIGRATION_HELPERS_H */ -- cgit v1.1