]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Re-run make autostyle.
authorNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:40:31 +0000 (09:40 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:40:31 +0000 (09:40 -0400)
38 files changed:
src/app/config/config.c
src/core/mainloop/mainloop.c
src/core/or/circuitpadding.c
src/core/or/or_periodic.c
src/feature/client/proxymode.h
src/feature/control/control_cmd.c
src/feature/control/control_events.c
src/feature/dirauth/dirauth_periodic.c
src/feature/dircommon/consdiff.c
src/feature/dirparse/authcert_members.h
src/feature/hs/hs_service.c
src/feature/relay/relay_periodic.c
src/feature/relay/router.c
src/feature/relay/routermode.h
src/lib/buf/buffers.c
src/lib/conf/confmacros.h
src/lib/conf/conftesting.h
src/lib/container/smartlist.h
src/lib/crypt_ops/crypto_openssl_mgt.c
src/lib/dispatch/dispatch_naming.c
src/lib/evloop/timers.c
src/lib/log/log.h
src/lib/log/util_bug.h
src/lib/thread/threads.h
src/lib/version/git_revision.c
src/lib/wallclock/timeval.h
src/test/test.h
src/test/test_addr.c
src/test/test_confparse.c
src/test/test_connection.c
src/test/test_controller.c
src/test/test_crypto.c
src/test/test_crypto_slow.c
src/test/test_dir.c
src/test/test_entrynodes.c
src/test/test_link_handshake.c
src/test/test_options.c
src/test/test_util.c

index 32ae620b0ef289a864713b1935258556e81c136d..2cf64d1b72d422191a8ba8f6998cc4184b0cd5b7 100644 (file)
@@ -191,7 +191,7 @@ static const char unix_q_socket_prefix[] = "unix:\"";
   { #name "DownloadSchedule", #name "DownloadInitialDelay", 0, 1 }
 #else
 #define DOWNLOAD_SCHEDULE(name) { NULL, NULL, 0, 1 }
-#endif
+#endif /* !defined(COCCI) */
 
 /** A list of abbreviations and aliases to map command-line options, obsolete
  * option names, or alternative option names, to their current values. */
index 0519935a19503b68491a12f8cd96d0d88eb0ab85..33a53e41610a35b0ffbee5c93864d6746177a6d1 100644 (file)
@@ -1379,7 +1379,7 @@ CALLBACK(second_elapsed);
 #define CALLBACK(name, r, f)                            \
   PERIODIC_EVENT(name, PERIODIC_EVENT_ROLE_ ## r, f)
 #define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
-#endif
+#endif /* !defined(COCCI) */
 
 STATIC periodic_event_item_t mainloop_periodic_events[] = {
 
index f5481bc24137d43783e4357e7dda9b7603d9a1f6..e9b14144cc67458c91765a71349ad8f4647b10f3 100644 (file)
@@ -131,7 +131,7 @@ STATIC smartlist_t *relay_padding_machines = NULL;
   if (!(circ)->padding_info[loop_var])                           \
     continue;
 #define FOR_EACH_ACTIVE_CIRCUIT_MACHINE_END } STMT_END ;
-#endif
+#endif /* !defined(COCCI) */
 
 /**
  * Free the machineinfo at an index
index 879d142cb2d337baacca678672b7b24d728e029c..0e79008275afe0dcd7442cf427225654704b3c34 100644 (file)
@@ -26,7 +26,7 @@
     PERIODIC_EVENT(name,                          \
                    PERIODIC_EVENT_ROLE_##roles,   \
                    flags)
-#endif
+#endif /* !defined(COCCI) */
 
 #define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
 
index f8352922c72ebceb6363f335bc31647b92797643..770a519155b54feedbb61e34b691a7206e41518d 100644 (file)
@@ -14,4 +14,4 @@
 
 int proxy_mode(const or_options_t *options);
 
-#endif
+#endif /* !defined(TOR_PROXYMODE_H) */
index 2ad7851b314312a2f335ac350d40a104a5fef5cf..68179beef016709f040cdd438b76ff62f923eb0a 100644 (file)
@@ -2281,7 +2281,7 @@ typedef struct control_cmd_def_t {
       0,                                        \
       &obsolete_syntax,                         \
   }
-#endif
+#endif /* !defined(COCCI) */
 
 /**
  * An array defining all the recognized controller commands.
index b8a46c306f5e3374f0049d49cc106de2d94c23d0..12b73641b27ca5673b1f5a5cb435a1adfe173fce 100644 (file)
@@ -1675,7 +1675,7 @@ control_event_status(int type, int severity, const char *format, va_list args)
     r = control_event_status((event), (sev), format, ap);       \
     va_end(ap);                                                 \
   } while (0)
-#endif
+#endif /* !defined(COCCI) */
 
 /** Format and send an EVENT_STATUS_GENERAL event whose main text is obtained
  * by formatting the arguments using the printf-style <b>format</b>. */
index c02b9ac862340814424b7f93cbdbcfb0cfe21e5e..fc26358290fb0e6566a2b02ecbf37eeb201447c4 100644 (file)
@@ -24,7 +24,7 @@
     PERIODIC_EVENT(name,                          \
                    PERIODIC_EVENT_ROLE_##roles,   \
                    flags)
-#endif
+#endif /* !defined(COCCI) */
 
 #define FL(name) (PERIODIC_EVENT_FLAG_##name)
 
index 3b6bffbbbd2023f4eada32d510787efe1e094ba9..fbfa9e0c0a04809bcb04c1dd855f8d872cdd2cd4 100644 (file)
@@ -535,7 +535,7 @@ typedef struct router_id_iterator_t {
  * Initializer for a router_id_iterator_t.
  */
 #define ROUTER_ID_ITERATOR_INIT { { NULL, 0 }, { NULL, 0 } }
-#endif
+#endif /* !defined(COCCI) */
 
 /** Given an index *<b>idxp</b> into the consensus at <b>cons</b>, advance
  * the index to the next router line ("r ...") in the consensus, or to
index 8f6fdf17c540f51ca1b4054a5e5fb22209e081e2..3b44c3eb02e9b16fa4a1717f604f905667e1962a 100644 (file)
@@ -26,4 +26,4 @@
                                                      NO_ARGS,     NEED_OBJ),\
   T01("dir-address",     K_DIR_ADDRESS,              GE(1),       NO_OBJ)
 
-#endif
+#endif /* !defined(TOR_AUTHCERT_MEMBERS_H) */
index 964bf68a17b13c504e6eae81f9e373f354a40316..da772fa6d26ea44c86f42f9e4ae1c7cb3087f664 100644 (file)
@@ -89,7 +89,7 @@
                                 (var = service->desc_next);      \
       if (var == NULL) continue;
 #define FOR_EACH_DESCRIPTOR_END } STMT_END ;
-#endif
+#endif /* !defined(COCCI) */
 
 /* Onion service directory file names. */
 static const char fname_keyfile_prefix[] = "hs_ed25519";
index 7dc4cb4530287299d4eee468bbfe0c92da4cb313..d1b3183953a60a10a15ea8d14c5795b2a149fe31 100644 (file)
@@ -37,7 +37,7 @@
     PERIODIC_EVENT(name,                          \
                    PERIODIC_EVENT_ROLE_##roles,   \
                    flags)
-#endif
+#endif /* !defined(COCCI) */
 
 #define FL(name) (PERIODIC_EVENT_FLAG_##name)
 
index 92803f88a90ba2eb416131cae6de0e3c73066eb3..5c790109348dcf80c15ed94a6924aa7777d66af6 100644 (file)
@@ -386,7 +386,7 @@ get_server_identity_key,(void))
   return server_identitykey;
 }
 
-#endif
+#endif /* defined(HAVE_MODULE_RELAY) */
 
 /** Return true iff we are a server and the server identity key
  * has been set. */
index f6195a86989a81c67a9fc6c5f287b101ccf69a75..9891a038adbaa8ba8ade37441244bbafb3c36ff3 100644 (file)
@@ -25,7 +25,7 @@ void set_server_advertised(int s);
 /** Is the relay module enabled? */
 #define have_module_relay() (1)
 
-#else
+#else /* !defined(HAVE_MODULE_RELAY) */
 
 #define dir_server_mode(options) (((void)(options)),0)
 #define server_mode(options) (((void)(options)),0)
@@ -37,6 +37,6 @@ void set_server_advertised(int s);
 
 #define have_module_relay() (0)
 
-#endif
+#endif /* defined(HAVE_MODULE_RELAY) */
 
 #endif /* !defined(TOR_ROUTERMODE_H) */
index 28710ebab3269c4fdcf669bafd9d0a6a1b1f67d3..4adc08fdbf813d2ad8c5da15d6aabdff4eda460c 100644 (file)
     memset(a,0,SENTINEL_LEN);                                           \
   } while (0)
 #endif /* defined(DISABLE_MEMORY_SENTINELS) */
-#endif
+#endif /* !defined(COCCI) */
 
 /** Move all bytes stored in <b>chunk</b> to the front of <b>chunk</b>->mem,
  * to free up space at the end. */
index 6449458a106616b986d24996ef2427b3bf67a608..67082454a21ef81e5f5cd5ca840e9e9831885a2b 100644 (file)
@@ -21,7 +21,7 @@
  **/
 #define END_OF_CONFIG_VARS                                      \
   { .member = { .name = NULL } DUMMY_CONF_TEST_MEMBERS }
-#endif
+#endif /* !defined(COCCI) */
 
 /**
  * Declare a config_var_t as a member named <b>membername</b> of the structure
index 8f82b5bf18fec51ebcaa39efc697becc1e5f167e..dbfd5640794ad9c7eb481937a8184fbd2d163f5d 100644 (file)
@@ -72,8 +72,8 @@ typedef union {
 #define DUMMY_CONF_TEST_MEMBERS , .var_ptr_dummy={ .INT=NULL }
 #define DUMMY_TYPECHECK_INSTANCE(tp)            \
   static tp tp ## _dummy
-#endif
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
+#endif /* !defined(COCCI) */
 
 #ifndef USE_CONF_TESTING
 #define CONF_TEST_MEMBERS(tp, conftype, member)
@@ -82,6 +82,6 @@ typedef union {
   struct tor_semicolon_eater
 #define DUMMY_CONF_TEST_MEMBERS
 
-#endif /* defined(TOR_UNIT_TESTS) */
+#endif /* !defined(USE_CONF_TESTING) */
 
 #endif /* !defined(TOR_LIB_CONF_CONFTESTING_H) */
index 1dadf4ae6bba9e8bf0910928a8179499b9ebb345..984cd2d2932cb78b0f69248bc2021fa7a8f328e6 100644 (file)
@@ -166,6 +166,6 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
 #define SMARTLIST_FOREACH_JOIN_END(var1, var2)  \
   }                                             \
   STMT_END
-#endif
+#endif /* !defined(COCCI) */
 
 #endif /* !defined(TOR_SMARTLIST_H) */
index 617c0dcd7633fb8502343305f5f9244cd0273df9..2fbebd87e07ecbbc4442df06cd144d579ba8ae86 100644 (file)
@@ -126,7 +126,7 @@ crypto_openssl_get_header_version_str(void)
 #error "OpenSSL has been built without thread support. Tor requires an \
  OpenSSL library with thread support enabled."
 #endif
-#endif
+#endif /* !defined(COCCI) */
 
 #ifndef NEW_THREAD_API
 /** Helper: OpenSSL uses this callback to manipulate mutexes. */
index 79411cb3a1632514c3da98c96e6684fbf2ab58c6..e8e28cc71e18ccf14ba81df319fe0e5d92b929bd 100644 (file)
@@ -57,7 +57,7 @@ dispatch_naming_init(void)
     return namemap_get_size(&type##_id_map);                            \
   }                                                                     \
   EAT_SEMICOLON
-#endif
+#endif /* !defined(COCCI) */
 
 DECLARE_ID_MAP_FNS(message);
 DECLARE_ID_MAP_FNS(channel);
index 23562971ca9d3ef4cbfa734f6aad2a19b26bcd6c..c5bb0f59589a0d9eefa2da1339542dba86372394 100644 (file)
@@ -64,7 +64,7 @@ struct timeout_cb {
 #else
 /* We're not exposing any of the functions outside this file. */
 #define TIMEOUT_PUBLIC static
-#endif /* defined(__GNUC__) */
+#endif /* defined(COCCI) || ... */
 /* We're not using periodic events. */
 #define TIMEOUT_DISABLE_INTERVALS
 /* We always know the global_timeouts object, so we don't need each timeout
index 19cb9484d7b20f0af400dafe662cc42f62eec8a4..5cf8a36cf75a9a619964427d1ef4c074a08380dd 100644 (file)
@@ -27,8 +27,8 @@
 #error "Your syslog.h thinks high numbers are more important.  " \
        "We aren't prepared to deal with that."
 #endif
-#endif
-#else /* !(defined(HAVE_SYSLOG_H)) */
+#endif /* LOG_DEBUG < LOG_ERR */
+#else /* !defined(HAVE_SYSLOG_H) */
 /* Note: Syslog's logging code refers to priorities, with 0 being the most
  * important.  Thus, all our comparisons needed to be reversed when we added
  * syslog support.
@@ -310,7 +310,7 @@ MOCK_DECL(STATIC void, logv, (int severity, log_domain_mask_t domain,
     va_list ap) CHECK_PRINTF(5,0));
 MOCK_DECL(STATIC void, add_stream_log_impl,(
          const log_severity_list_t *severity, const char *name, int fd));
-#endif
+#endif /* defined(LOG_PRIVATE) */
 
 #if defined(LOG_PRIVATE) || defined(TOR_UNIT_TESTS)
 /** Given a severity, yields an index into log_severity_list_t.masks to use
index dcff5fd9c3472699e2cffcd82ac831bddeffacf4..d0a311ac611846e4fe3ca36dba3136be60edeb4b 100644 (file)
         1))                                                             \
       : 0)
 #endif /* defined(__GNUC__) */
-#endif
+#endif /* !defined(COCCI) */
 
 #define IF_BUG_ONCE_VARNAME_(a)               \
   warning_logged_on_ ## a ## __
index 2e63dac5d999fe2612d67668d42a9050cf1602d4..ad9ad98c704438ee73a9938eb42cee4d623b41a6 100644 (file)
@@ -109,7 +109,7 @@ typedef struct atomic_counter_t {
 #ifndef COCCI
 #define ATOMIC_LINKAGE static
 #endif
-#else /* !(defined(HAVE_WORKING_STDATOMIC)) */
+#else /* !defined(HAVE_WORKING_STDATOMIC) */
 typedef struct atomic_counter_t {
   tor_mutex_t mutex;
   size_t val;
index 338ba2bc3da3c93dc7611e223232fbfce3519c51..6cfb3b4ec097355a9bcfc7b87db10dd444845c6a 100644 (file)
@@ -24,5 +24,5 @@ const char tor_bug_suffix[] = " (on Tor " VERSION
   " "
 #include "micro-revision.i"
 #endif
-#endif
+#endif /* !defined(COCCI) */
   ")";
index 897a86441694f9e1b5644fbc7e348c1c8a959e6b..4710a3dfd710345a9d6fe87dec3dac0fc3672d4f 100644 (file)
@@ -83,6 +83,6 @@
    ((tv1)->tv_usec op (tv2)->tv_usec) :         \
    ((tv1)->tv_sec op (tv2)->tv_sec))
 #endif /* !defined(timercmp) */
-#endif
+#endif /* !defined(COCCI) */
 
 #endif /* !defined(TOR_TIMEVAL_H) */
index e9caef3fecb4334b42570a4f930db1fc0ad15101..feaa13a3a5c78eff341d8ce9d5cf5803c5ef8623 100644 (file)
@@ -65,7 +65,7 @@
   tt_assert_test_fmt_type(a,b,#a" "#op" "#b,int64_t,(val1_ op val2_),  \
     int64_t, "%"PRId64,                                                \
     {print_ = (int64_t) value_;}, {}, TT_EXIT_TEST_FUNCTION)
-#endif
+#endif /* !defined(COCCI) */
 
 /**
  * Declare that the test is done, even though no tt___op() calls were made.
@@ -164,7 +164,7 @@ void free_pregenerated_keys(void);
       NULL,  \
       NULL,  \
   }
-#endif
+#endif /* !defined(COCCI) */
 
 #define NS(name) US_CONCAT_3_(NS_MODULE, NS_SUBMODULE, name)
 #define NS_FULL(module, submodule, name) US_CONCAT_3_(module, submodule, name)
@@ -175,7 +175,7 @@ void free_pregenerated_keys(void);
     extern int CALLED(mock_fn);        \
     static retval NS(mock_fn) args; int CALLED(mock_fn) = 0
 #define NS_MOCK(name) MOCK(name, NS(name))
-#endif
+#endif /* !defined(COCCI) */
 #define NS_UNMOCK(name) UNMOCK(name)
 
 extern const struct testcase_setup_t passthrough_setup;
index 44f3cd9ec188d6ba511c795884a27c7fc9d5a590..04380d1ccf6019cc8beac045a1070145dea9ed51 100644 (file)
@@ -70,7 +70,7 @@ test_addr_basic(void *arg)
     TT_EXIT_TEST_FUNCTION                                        \
   );                                                             \
   STMT_END
-#endif
+#endif /* !defined(COCCI) */
 
 /** Helper: Assert that two strings both decode as IPv6 addresses with
  * tor_inet_pton(), and both decode to the same address. */
@@ -138,7 +138,7 @@ test_addr_basic(void *arg)
       TT_DIE(("Failed: tor_addr_compare_masked(%s,%s,%d) %s 0", \
               a, b, m, #op));                                   \
   STMT_END
-#endif
+#endif /* !defined(COCCI) */
 
 /** Helper: assert that <b>xx</b> is parseable as a masked IPv6 address with
  * ports by tor_parse_mask_addr_ports(), with family <b>f</b>, IP address
index 33979813fd36e6610781af5436111668702aee4d..206fe0fc0ad97eda73bda2801fdf0b33a3ef76d4 100644 (file)
@@ -1044,7 +1044,7 @@ test_confparse_find_option_name(void *arg)
 #define BADVAL_TEST(name)                               \
   { "badval_" #name, test_confparse_assign_badval, 0,   \
       &passthrough_setup, (void*)&bv_ ## name }
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t confparse_tests[] = {
   CONFPARSE_TEST(init, 0),
index 3148c1af6694e0ba98c356ea3564a6ea825e94ce..0d2827670249f3d1757afb30594ad4bbd77f412e 100644 (file)
@@ -888,7 +888,7 @@ test_failed_orconn_tracker(void *arg)
 /* where arg is an expression (constant, variable, compound expression) */
 #define CONNECTION_TESTCASE_ARG(name, fork, setup, arg)                  \
   { #name "_" #arg, test_conn_##name, fork, &setup, (void *)arg }
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t connection_tests[] = {
   CONNECTION_TESTCASE(get_basic, TT_FORK, test_conn_get_basic_st),
index c68e35ab3b4b7c9a5cb9a32f392f0584d1879678..793696c474430be10a9e090ccda8a7d6b2c8ef5b 100644 (file)
@@ -130,7 +130,7 @@ test_controller_parse_cmd(void *arg)
   { &syntax,                                     \
       ARRAY_LENGTH(array),                       \
       array }
-#endif
+#endif /* !defined(COCCI) */
 
 static const parser_testcase_t one_to_three_tests[] = {
    ERR("", "Need at least 1 argument(s)"),
index ae9c51e00a4886ae7a9dc5ddbb6bad6ef6c30169..2c57e50a4cbb87dd56cd3dc3686631ef782d1a8f 100644 (file)
@@ -2982,7 +2982,7 @@ test_crypto_failure_modes(void *arg)
 #define ED25519_TEST(name, fl)                  \
   ED25519_TEST_ONE(name, (fl), "donna"),        \
   ED25519_TEST_ONE(name, (fl), "ref10")
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t crypto_tests[] = {
   CRYPTO_LEGACY(formats),
index 4f0cfbc641160774b015d6dbaa0ca650b562450a..9ee7b100b306000da38a05821b16b711d1ca1a9e 100644 (file)
@@ -595,7 +595,7 @@ test_crypto_ed25519_fuzz_donna(void *arg)
 #define ED25519_TEST(name, fl)                  \
   ED25519_TEST_ONE(name, (fl), "donna"),        \
   ED25519_TEST_ONE(name, (fl), "ref10")
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t slow_crypto_tests[] = {
   CRYPTO_LEGACY(s2k_rfc2440),
index 77cc1f97b4affc5be41c5b82345d4ad6ba871c87..02988d247167b8549b40738e9dbb5e41a2bcd0c5 100644 (file)
@@ -7220,7 +7220,7 @@ test_dir_format_versions_list(void *arg)
 /* where arg is a string constant */
 #define DIR_ARG(name,flags,arg)                      \
   { #name "_" arg, test_dir_##name, (flags), &passthrough_setup, (void*) arg }
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t dir_tests[] = {
   DIR_LEGACY(nicknames),
index 598babe22b952a0a2741dd8070e207fec8f23f43..dec7874c7d189fe04f57c1c3d9f5db32a2f5ad5a 100644 (file)
@@ -3062,7 +3062,7 @@ static const struct testcase_setup_t upgrade_circuits = {
     &upgrade_circuits, (void*)(arg REASONABLY_FUTURE) }, \
   { #name "_reasonably_past", test_entry_guard_ ## name, TT_FORK, \
     &upgrade_circuits, (void*)(arg REASONABLY_PAST) }
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t entrynodes_tests[] = {
   NO_PREFIX_TEST(node_preferred_orport),
index 1371e1ef74a45a494b6da8516645d058737dba9f..18c1700031945ccf8e6bcdb2af670d74dda9f91e 100644 (file)
@@ -1528,7 +1528,7 @@ AUTHENTICATE_FAIL(missing_ed_auth,
 #define TEST_AUTHENTICATE_ED(name)                                      \
   { "authenticate/" #name "_ed25519" , test_link_handshake_auth_ ## name, \
       TT_FORK, &setup_authenticate, (void*)3 }
-#endif
+#endif /* !defined(COCCI) */
 
 struct testcase_t link_handshake_tests[] = {
   TEST_RSA(certs_ok, TT_FORK),
index aeb5de210a905fc496db9fdf38c01182576850a6..6b6a52ae83a028022198ba6f6da5cddf6fbdd2c4 100644 (file)
@@ -696,7 +696,7 @@ test_options_validate__logs(void *ignored)
   tt_int_op(ret, OP_EQ, -1);
 #else
   tt_int_op(ret, OP_EQ, 0);
-#endif
+#endif /* defined(_WIN32) */
 
   free_options_test_data(tdata);
   tdata = get_options_test_data("");
index 09978a13c9fc7926e0d6c302f8f16383011d0627..3e4975fcd8af01c28cb8047bb9bf5f1580c82f00 100644 (file)
@@ -317,7 +317,7 @@ test_util_write_chunks_to_file(void *arg)
             _TFE(a, b, tm_min ); \
             _TFE(a, b, tm_sec ); \
           TT_STMT_END
-#endif
+#endif /* !defined(COCCI) */
 
 static void
 test_util_time(void *arg)
@@ -6284,7 +6284,7 @@ test_util_map_anon_nofork(void *arg)
   { "compress_dos/" #name, test_util_decompress_dos, 0,                 \
     &compress_setup,                                                    \
     (char*)(identifier) }
-#endif
+#endif /* !defined(COCCI) */
 
 #ifdef _WIN32
 #define UTIL_TEST_NO_WIN(n, f) { #n, NULL, TT_SKIP, NULL, NULL }