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/lib/conf | |
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/lib/conf')
-rw-r--r-- | src/lib/conf/conftypes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h index ebc2736aaa..081ebf397f 100644 --- a/src/lib/conf/conftypes.h +++ b/src/lib/conf/conftypes.h @@ -260,6 +260,7 @@ typedef struct config_deprecation_t { const char *why_deprecated; } config_deprecation_t; +#ifndef COCCI /** * Handy macro for declaring "In the config file or on the command line, you * can abbreviate <b>tok</b>s as <b>tok</b>". Used inside an array of @@ -268,7 +269,8 @@ typedef struct config_deprecation_t { * For example, to declare "NumCpu" as an abbreviation for "NumCPUs", * you can say PLURAL(NumCpu). **/ -#define PLURAL(tok) { #tok, #tok "s", 0, 0 } +#define PLURAL(tok) { (#tok), (#tok "s"), 0, 0 } +#endif /* !defined(COCCI) */ /** * Validation function: verify whether a configuation object is well-formed |