[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] With coccinelle, avoid includes in the middle of an expression.



commit 630d8c7a1acda53b640b018039f7ec586e048ad7
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Oct 9 10:16:08 2019 -0400

    With coccinelle, avoid includes in the middle of an expression.
---
 src/app/config/config.c               | 6 ++++++
 src/feature/dirparse/authcert_parse.c | 2 ++
 src/feature/dirparse/ns_parse.c       | 2 ++
 src/lib/tls/tortls_openssl.c          | 2 ++
 src/lib/version/git_revision.c        | 4 ++++
 src/test/test_config.c                | 2 ++
 6 files changed, 18 insertions(+)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index b4bccd935..93cf5427c 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -765,7 +765,9 @@ static const config_var_t option_vars_[] = {
 
 /** List of default directory authorities */
 static const char *default_authorities[] = {
+#ifndef COCCI
 #include "auth_dirs.inc"
+#endif
   NULL
 };
 
@@ -773,7 +775,9 @@ static const char *default_authorities[] = {
  * relays that meet certain stability criteria.
  */
 static const char *default_fallbacks[] = {
+#ifndef COCCI
 #include "fallback_dirs.inc"
+#endif
   NULL
 };
 
@@ -783,7 +787,9 @@ static const struct {
   const char *k;
   const char *v;
 } testing_tor_network_defaults[] = {
+#ifndef COCCI
 #include "testnet.inc"
+#endif
   { NULL, NULL }
 };
 
diff --git a/src/feature/dirparse/authcert_parse.c b/src/feature/dirparse/authcert_parse.c
index 8ba5a5398..5e4b12c76 100644
--- a/src/feature/dirparse/authcert_parse.c
+++ b/src/feature/dirparse/authcert_parse.c
@@ -16,7 +16,9 @@
 
 /** List of tokens recognized in V3 authority certificates. */
 static token_rule_t dir_key_certificate_table[] = {
+#ifndef COCCI
 #include "feature/dirparse/authcert_members.i"
+#endif
   T1("fingerprint",      K_FINGERPRINT,              CONCAT_ARGS, NO_OBJ ),
   END_OF_TABLE
 };
diff --git a/src/feature/dirparse/ns_parse.c b/src/feature/dirparse/ns_parse.c
index d5405e646..0cf2a6f78 100644
--- a/src/feature/dirparse/ns_parse.c
+++ b/src/feature/dirparse/ns_parse.c
@@ -84,7 +84,9 @@ static token_rule_t networkstatus_token_table[] = {
   T01("required-relay-protocols",    K_REQUIRED_RELAY_PROTOCOLS,
       CONCAT_ARGS, NO_OBJ ),
 
+#ifndef COCCI
 #include "feature/dirparse/authcert_members.i"
+#endif
 
   T0N("opt",                 K_OPT,             CONCAT_ARGS, OBJ_OK ),
   T1( "contact",             K_CONTACT,         CONCAT_ARGS, NO_OBJ ),
diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c
index 86f0ac42c..42db05460 100644
--- a/src/lib/tls/tortls_openssl.c
+++ b/src/lib/tls/tortls_openssl.c
@@ -464,7 +464,9 @@ static const char UNRESTRICTED_SERVER_CIPHER_LIST[] =
 /** List of ciphers that clients should advertise, omitting items that
  * our OpenSSL doesn't know about. */
 static const char CLIENT_CIPHER_LIST[] =
+#ifndef COCCI
 #include "lib/tls/ciphers.inc"
+#endif
   /* Tell it not to use SSLv2 ciphers, so that it can select an SSLv3 version
    * of any cipher we say. */
   "!SSLv2"
diff --git a/src/lib/version/git_revision.c b/src/lib/version/git_revision.c
index 900a1e12a..338ba2bc3 100644
--- a/src/lib/version/git_revision.c
+++ b/src/lib/version/git_revision.c
@@ -11,14 +11,18 @@
  * src/core/include.am, and is usually right.
  */
 const char tor_git_revision[] =
+#ifndef COCCI
 #ifndef _MSC_VER
 #include "micro-revision.i"
 #endif
+#endif
   "";
 
 const char tor_bug_suffix[] = " (on Tor " VERSION
+#ifndef COCCI
 #ifndef _MSC_VER
   " "
 #include "micro-revision.i"
 #endif
+#endif
   ")";
diff --git a/src/test/test_config.c b/src/test/test_config.c
index 9b715b2ec..162a49990 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -3815,7 +3815,9 @@ static void
 test_config_default_fallback_dirs(void *arg)
 {
   const char *fallback[] = {
+#ifndef COCCI
 #include "app/config/fallback_dirs.inc"
+#endif
     NULL
   };
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits