From 3e41459dff9e62cabe2636eac61d19b32dd0a4e1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 9 Oct 2019 12:39:31 -0400 Subject: [PATCH] confmacros.h: fix coccinelle parsing. --- scripts/coccinelle/tor-coccinelle.h | 3 +++ src/lib/conf/confmacros.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/scripts/coccinelle/tor-coccinelle.h b/scripts/coccinelle/tor-coccinelle.h index c83dce3c5c..44d79325eb 100644 --- a/scripts/coccinelle/tor-coccinelle.h +++ b/scripts/coccinelle/tor-coccinelle.h @@ -57,4 +57,7 @@ #define NS_DECL(a, b, c) a b c #define NS(a) a +#define CONF_TEST_MEMBERS(a,b,c) +#define DUMMY_CONF_TEST_MEMBERS + #define EAT_SEMICOLON extern int dummy__; diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h index 68121891f1..6449458a10 100644 --- a/src/lib/conf/confmacros.h +++ b/src/lib/conf/confmacros.h @@ -15,11 +15,13 @@ #include "orconfig.h" #include "lib/conf/conftesting.h" +#ifndef COCCI /** * Used to indicate the end of an array of configuration variables. **/ #define END_OF_CONFIG_VARS \ { .member = { .name = NULL } DUMMY_CONF_TEST_MEMBERS } +#endif /** * Declare a config_var_t as a member named membername of the structure