summaryrefslogtreecommitdiff
path: root/src/feature/control
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-10 15:01:42 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-06 14:54:04 -0500
commit06a6130666315cb1d385b89d7c95df42ac17db1a (patch)
tree59336636e904ffb39180dbcfcf9d7fa1b913d38a /src/feature/control
parent6104c407e077175087b7ae117c0ace5ce3897bcf (diff)
downloadtor-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/feature/control')
-rw-r--r--src/feature/control/control_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c
index c2d23243e5..cdefef97e1 100644
--- a/src/feature/control/control_cmd.c
+++ b/src/feature/control/control_cmd.c
@@ -2272,7 +2272,7 @@ typedef struct control_cmd_def_t {
**/
#define ONE_LINE(name, flags) \
{ \
- #name, \
+ (#name), \
handle_control_ ##name, \
flags, \
&name##_syntax, \
@@ -2283,7 +2283,7 @@ typedef struct control_cmd_def_t {
* flags.
**/
#define MULTLINE(name, flags) \
- { "+"#name, \
+ { ("+"#name), \
handle_control_ ##name, \
flags, \
&name##_syntax \