diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-10 15:01:42 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-02-06 14:54:04 -0500 |
commit | 06a6130666315cb1d385b89d7c95df42ac17db1a (patch) | |
tree | 59336636e904ffb39180dbcfcf9d7fa1b913d38a /src/test/test_util_process.c | |
parent | 6104c407e077175087b7ae117c0ace5ce3897bcf (diff) | |
download | tor-06a6130666315cb1d385b89d7c95df42ac17db1a.tar.gz tor-06a6130666315cb1d385b89d7c95df42ac17db1a.zip |
Use parentheses to avoid mis-indentations of stringified macro args
clang-format sometimes thinks that "#name" should be written as
"# name" if it appears at the start of a line. Using () appears
to suppress this, while confusing Coccinelle.
Diffstat (limited to 'src/test/test_util_process.c')
-rw-r--r-- | src/test/test_util_process.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_util_process.c b/src/test/test_util_process.c index 0e17e009f3..f0e7334a9b 100644 --- a/src/test/test_util_process.c +++ b/src/test/test_util_process.c @@ -67,10 +67,12 @@ test_util_process_clear_waitpid_callback(void *ignored) } #endif /* !defined(_WIN32) */ +#ifndef COCCI #ifndef _WIN32 -#define TEST(name) { #name, test_util_process_##name, 0, NULL, NULL } +#define TEST(name) { (#name), test_util_process_##name, 0, NULL, NULL } #else -#define TEST(name) { #name, NULL, TT_SKIP, NULL, NULL } +#define TEST(name) { (#name), NULL, TT_SKIP, NULL, NULL } +#endif #endif struct testcase_t util_process_tests[] = { @@ -78,4 +80,3 @@ struct testcase_t util_process_tests[] = { TEST(clear_waitpid_callback), END_OF_TESTCASES }; - |