]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
With coccinelle, avoid includes in the middle of an expression.
authorNick Mathewson <nickm@torproject.org>
Wed, 9 Oct 2019 14:16:08 +0000 (10:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:24:25 +0000 (09:24 -0400)
src/app/config/config.c
src/feature/dirparse/authcert_parse.c
src/feature/dirparse/ns_parse.c
src/lib/tls/tortls_openssl.c
src/lib/version/git_revision.c
src/test/test_config.c

index b4bccd9351cc4277d5b6268878d1249c9b10f027..93cf5427cd788221bb9ebd1eec58b5b5e86f2069 100644 (file)
@@ -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 }
 };
 
index 8ba5a539812ee5a2fbd9084f4c3c4923dda0d69b..5e4b12c76cc96df7ca45000fd0aae86492d59472 100644 (file)
@@ -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
 };
index d5405e64640e15b387f9e99e8aefaaf1176a232b..0cf2a6f7893257f7706aec574b572d6bc6effbe1 100644 (file)
@@ -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 ),
index 86f0ac42cc36c5fe0d2b24b2e37b373778422509..42db05460ef0c76b5eb16dbe4e82e6a30ebc28e7 100644 (file)
@@ -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"
index 900a1e12a0a7e7e936e6ee1bc0e152f11ff6e9fd..338ba2bc3da3c93dc7611e223232fbfce3519c51 100644 (file)
  * 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
   ")";
index 9b715b2ecf681a04829c7c39829b13fca8923f8c..162a4999001835689479560ea6809eb07c18ae7f 100644 (file)
@@ -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
   };