Browse Source

Run "make autostyle."

Nick Mathewson 4 years ago
parent
commit
60213a3621
100 changed files with 132 additions and 132 deletions
  1. 4 4
      src/app/config/config.c
  2. 1 1
      src/app/config/or_options_st.h
  3. 1 1
      src/app/config/or_state_st.h
  4. 1 1
      src/app/config/statefile.h
  5. 1 1
      src/app/main/subsysmgr.h
  6. 1 1
      src/core/crypto/onion_crypto.h
  7. 5 5
      src/core/mainloop/connection.c
  8. 2 2
      src/core/mainloop/mainloop.c
  9. 3 3
      src/core/mainloop/mainloop.h
  10. 3 3
      src/core/mainloop/mainloop_pubsub.c
  11. 1 1
      src/core/mainloop/mainloop_pubsub.h
  12. 1 1
      src/core/mainloop/mainloop_sys.h
  13. 1 1
      src/core/mainloop/netstatus.h
  14. 1 1
      src/core/or/addr_policy_st.h
  15. 1 1
      src/core/or/address_set.h
  16. 1 1
      src/core/or/cell_queue_st.h
  17. 1 1
      src/core/or/cell_st.h
  18. 1 1
      src/core/or/circuit_st.h
  19. 2 2
      src/core/or/circuitpadding.c
  20. 3 3
      src/core/or/circuitpadding.h
  21. 2 2
      src/core/or/circuitpadding_machines.h
  22. 1 1
      src/core/or/connection_st.h
  23. 1 1
      src/core/or/cpath_build_state_st.h
  24. 1 1
      src/core/or/crypt_path.h
  25. 1 1
      src/core/or/crypt_path_reference_st.h
  26. 2 2
      src/core/or/crypt_path_st.h
  27. 1 1
      src/core/or/destroy_cell_queue_st.h
  28. 2 2
      src/core/or/dos.h
  29. 1 1
      src/core/or/edge_connection_st.h
  30. 1 1
      src/core/or/entry_connection_st.h
  31. 1 1
      src/core/or/entry_port_cfg_st.h
  32. 1 1
      src/core/or/extend_info_st.h
  33. 1 1
      src/core/or/half_edge_st.h
  34. 1 1
      src/core/or/listener_connection_st.h
  35. 1 1
      src/core/or/ocirc_event.h
  36. 1 1
      src/core/or/ocirc_event_sys.h
  37. 1 1
      src/core/or/or_circuit_st.h
  38. 1 1
      src/core/or/or_connection_st.h
  39. 1 1
      src/core/or/or_handshake_certs_st.h
  40. 1 1
      src/core/or/or_handshake_state_st.h
  41. 1 1
      src/core/or/or_periodic.c
  42. 1 1
      src/core/or/orconn_event.h
  43. 1 1
      src/core/or/orconn_event_sys.h
  44. 1 1
      src/core/or/origin_circuit_st.h
  45. 1 1
      src/core/or/port_cfg_st.h
  46. 1 1
      src/core/or/relay_crypto_st.h
  47. 2 2
      src/core/or/sendme.h
  48. 1 1
      src/core/or/server_port_cfg_st.h
  49. 1 1
      src/core/or/socks_request_st.h
  50. 1 1
      src/core/or/tor_version_st.h
  51. 1 1
      src/core/or/var_cell_st.h
  52. 2 2
      src/feature/api/tor_api.c
  53. 1 1
      src/feature/api/tor_api.h
  54. 1 1
      src/feature/control/btrack_circuit.h
  55. 2 2
      src/feature/control/btrack_orconn.h
  56. 1 1
      src/feature/control/btrack_orconn_cevent.h
  57. 1 1
      src/feature/control/btrack_orconn_maps.h
  58. 1 1
      src/feature/control/btrack_sys.h
  59. 1 1
      src/feature/control/control_connection_st.h
  60. 1 1
      src/feature/control/control_getinfo.h
  61. 1 1
      src/feature/control/fmt_serverstatus.h
  62. 1 1
      src/feature/control/getinfo_geoip.h
  63. 3 3
      src/feature/dirauth/authmode.h
  64. 1 1
      src/feature/dirauth/bridgeauth.h
  65. 1 1
      src/feature/dirauth/bwauth.h
  66. 3 3
      src/feature/dirauth/dirauth_periodic.h
  67. 1 1
      src/feature/dirauth/dirauth_sys.h
  68. 2 2
      src/feature/dirauth/dirvote.h
  69. 1 1
      src/feature/dirauth/dsigs_parse.h
  70. 1 1
      src/feature/dirauth/guardfraction.h
  71. 1 1
      src/feature/dirauth/ns_detached_signatures_st.h
  72. 1 1
      src/feature/dirauth/process_descs.h
  73. 1 1
      src/feature/dirauth/reachability.h
  74. 2 2
      src/feature/dirauth/recommend_pkg.h
  75. 2 2
      src/feature/dirauth/shared_random.h
  76. 1 1
      src/feature/dirauth/vote_microdesc_hash_st.h
  77. 3 3
      src/feature/dirauth/voteflags.h
  78. 1 1
      src/feature/dircache/cached_dir_st.h
  79. 1 1
      src/feature/dircache/consdiffmgr.c
  80. 1 1
      src/feature/dircache/dircache.h
  81. 1 1
      src/feature/dirclient/dir_server_st.h
  82. 1 1
      src/feature/dirclient/dirclient.h
  83. 1 1
      src/feature/dirclient/dlstatus.h
  84. 1 1
      src/feature/dirclient/download_status_st.h
  85. 1 1
      src/feature/dircommon/dir_connection_st.h
  86. 1 1
      src/feature/dircommon/vote_timing_st.h
  87. 1 1
      src/feature/dircommon/voting_schedule.h
  88. 1 1
      src/feature/dirparse/microdesc_parse.h
  89. 2 2
      src/feature/dirparse/ns_parse.h
  90. 1 1
      src/feature/dirparse/sigcommon.h
  91. 1 1
      src/feature/dirparse/signing.h
  92. 1 1
      src/feature/dirparse/unparseable.h
  93. 2 2
      src/feature/hibernate/hibernate.c
  94. 1 1
      src/feature/hs/hs_service.h
  95. 1 1
      src/feature/hs/hs_stats.h
  96. 1 1
      src/feature/hs/hsdir_index_st.h
  97. 1 1
      src/feature/hs_common/shared_random_client.h
  98. 1 1
      src/feature/keymgt/loadkey.h
  99. 1 1
      src/feature/nodelist/authcert.h
  100. 1 1
      src/feature/nodelist/authority_cert_st.h

+ 4 - 4
src/app/config/config.c

@@ -3551,7 +3551,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
     tor_free(t);
     t = format_recommended_version_list(options->RecommendedServerVersions, 1);
     tor_free(t);
-#endif
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
     if (options->UseEntryGuards) {
       log_info(LD_CONFIG, "Authoritative directory servers can't set "
@@ -3577,7 +3577,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
     if (options->GuardfractionFile && !old_options) {
       dirserv_read_guardfraction_file(options->GuardfractionFile, NULL);
     }
-#endif
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
   }
 
   if (options->AuthoritativeDir && !options->DirPort_set)
@@ -4605,7 +4605,7 @@ compute_real_max_mem_in_queues(const uint64_t val, int log_guess)
 #else
 /* On a 32-bit platform, we can't have 8GB of ram. */
 #define RAM_IS_VERY_LARGE(x) (0)
-#endif
+#endif /* SIZEOF_SIZE_T > 4 */
 
       if (RAM_IS_VERY_LARGE(ram)) {
         /* If we have 8 GB, or more, RAM available, we set the MaxMemInQueues
@@ -5777,7 +5777,7 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
 #else
         log_warn(LD_CONFIG, "Android logging is not supported"
                             " on this system. Sorry.");
-#endif // HAVE_ANDROID_LOG_H.
+#endif /* defined(HAVE_ANDROID_LOG_H) */
         goto cleanup;
       }
     }

+ 1 - 1
src/app/config/or_options_st.h

@@ -1110,4 +1110,4 @@ struct or_options_t {
   int DormantCanceledByStartup;
 };
 
-#endif
+#endif /* !defined(TOR_OR_OPTIONS_ST_H) */

+ 1 - 1
src/app/config/or_state_st.h

@@ -96,4 +96,4 @@ struct or_state_t {
   int Dormant;
 };
 
-#endif
+#endif /* !defined(TOR_OR_STATE_ST_H) */

+ 1 - 1
src/app/config/statefile.h

@@ -31,6 +31,6 @@ STATIC struct config_line_t *get_transport_in_state_by_name(
 STATIC void or_state_free_(or_state_t *state);
 #define or_state_free(st) FREE_AND_NULL(or_state_t, or_state_free_, (st))
 STATIC or_state_t *or_state_new(void);
-#endif
+#endif /* defined(STATEFILE_PRIVATE) */
 
 #endif /* !defined(TOR_STATEFILE_H) */

+ 1 - 1
src/app/main/subsysmgr.h

@@ -26,4 +26,4 @@ void subsystems_prefork(void);
 void subsystems_postfork(void);
 void subsystems_thread_cleanup(void);
 
-#endif
+#endif /* !defined(TOR_SUBSYSMGR_T) */

+ 1 - 1
src/core/crypto/onion_crypto.h

@@ -44,4 +44,4 @@ void server_onion_keys_free_(server_onion_keys_t *keys);
 #define server_onion_keys_free(keys) \
   FREE_AND_NULL(server_onion_keys_t, server_onion_keys_free_, (keys))
 
-#endif
+#endif /* !defined(TOR_ONION_CRYPTO_H) */

+ 5 - 5
src/core/mainloop/connection.c

@@ -1476,7 +1476,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
         goto err;
       }
     }
-#endif /* __APPLE__ */
+#endif /* !defined(__APPLE__) */
 #endif /* defined(HAVE_SYS_UN_H) */
   } else {
     log_err(LD_BUG, "Got unexpected address family %d.",
@@ -2856,7 +2856,7 @@ retry_listener_ports(smartlist_t *old_conns,
           SMARTLIST_DEL_CURRENT(old_conns, conn);
           break;
         }
-#endif
+#endif /* defined(ENABLE_LISTENER_REBIND) */
       }
     } SMARTLIST_FOREACH_END(wanted);
 
@@ -2958,7 +2958,7 @@ retry_all_listeners(smartlist_t *new_conns, int close_all_noncontrol)
                conn_type_to_string(old_conn->type), old_conn->address,
                old_conn->port, new_conn->address, new_conn->port);
   } SMARTLIST_FOREACH_END(r);
-#endif
+#endif /* defined(ENABLE_LISTENER_REBIND) */
 
   /* Any members that were still in 'listeners' don't correspond to
    * any configured port.  Kill 'em. */
@@ -3957,9 +3957,9 @@ update_send_buffer_size(tor_socket_t sock)
       &isb, sizeof(isb), &bytesReturned, NULL, NULL)) {
     setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (const char*)&isb, sizeof(isb));
   }
-#else
+#else /* !(defined(_WIN32)) */
   (void) sock;
-#endif
+#endif /* defined(_WIN32) */
 }
 
 /** Try to flush more bytes onto <b>conn</b>-\>s.

+ 2 - 2
src/core/mainloop/mainloop.c

@@ -754,7 +754,7 @@ tor_shutdown_event_loop_for_restart_cb(
   tor_event_free(tor_shutdown_event_loop_for_restart_event);
   tor_shutdown_event_loop_and_exit(0);
 }
-#endif
+#endif /* defined(ENABLE_RESTART_DEBUGGING) */
 
 /**
  * After finishing the current callback (if any), shut down the main loop,
@@ -2375,7 +2375,7 @@ do_main_loop(void)
       event_add(tor_shutdown_event_loop_for_restart_event, &restart_after);
     }
   }
-#endif
+#endif /* defined(ENABLE_RESTART_DEBUGGING) */
 
   return run_main_loop_until_done();
 }

+ 3 - 3
src/core/mainloop/mainloop.h

@@ -112,7 +112,7 @@ extern smartlist_t *connection_array;
 /* We need the periodic_event_item_t definition. */
 #include "core/mainloop/periodic.h"
 extern periodic_event_item_t mainloop_periodic_events[];
-#endif
-#endif /* defined(MAIN_PRIVATE) */
+#endif /* defined(TOR_UNIT_TESTS) */
+#endif /* defined(MAINLOOP_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_MAINLOOP_H) */

+ 3 - 3
src/core/mainloop/mainloop_pubsub.c

@@ -6,9 +6,9 @@
 
 #include "orconfig.h"
 
-#include "src/core/or/or.h"
-#include "src/core/mainloop/mainloop.h"
-#include "src/core/mainloop/mainloop_pubsub.h"
+#include "core/or/or.h"
+#include "core/mainloop/mainloop.h"
+#include "core/mainloop/mainloop_pubsub.h"
 
 #include "lib/container/smartlist.h"
 #include "lib/dispatch/dispatch.h"

+ 1 - 1
src/core/mainloop/mainloop_pubsub.h

@@ -21,4 +21,4 @@ int tor_mainloop_set_delivery_strategy(const char *msg_channel_name,
                                         deliv_strategy_t strategy);
 void tor_mainloop_disconnect_pubsub(void);
 
-#endif
+#endif /* !defined(TOR_MAINLOOP_PUBSUB_H) */

+ 1 - 1
src/core/mainloop/mainloop_sys.h

@@ -9,4 +9,4 @@
 
 extern const struct subsys_fns_t sys_mainloop;
 
-#endif
+#endif /* !defined(MAINLOOP_SYS_H) */

+ 1 - 1
src/core/mainloop/netstatus.h

@@ -21,4 +21,4 @@ void netstatus_flush_to_state(or_state_t *state, time_t now);
 void netstatus_load_from_state(const or_state_t *state, time_t now);
 void netstatus_note_clock_jumped(time_t seconds_diff);
 
-#endif
+#endif /* !defined(TOR_NETSTATUS_H) */

+ 1 - 1
src/core/or/addr_policy_st.h

@@ -43,4 +43,4 @@ struct addr_policy_t {
   uint16_t prt_max; /**< Highest port number to accept/reject. */
 };
 
-#endif
+#endif /* !defined(TOR_ADDR_POLICY_ST_H) */

+ 1 - 1
src/core/or/address_set.h

@@ -28,4 +28,4 @@ void address_set_add_ipv4h(address_set_t *set, uint32_t addr);
 int address_set_probably_contains(const address_set_t *set,
                                   const struct tor_addr_t *addr);
 
-#endif
+#endif /* !defined(TOR_ADDRESS_SET_H) */

+ 1 - 1
src/core/or/cell_queue_st.h

@@ -26,4 +26,4 @@ struct cell_queue_t {
   int n; /**< The number of cells in the queue. */
 };
 
-#endif
+#endif /* !defined(PACKED_CELL_ST_H) */

+ 1 - 1
src/core/or/cell_st.h

@@ -16,5 +16,5 @@ struct cell_t {
   uint8_t payload[CELL_PAYLOAD_SIZE]; /**< Cell body. */
 };
 
-#endif
+#endif /* !defined(CELL_ST_H) */
 

+ 1 - 1
src/core/or/circuit_st.h

@@ -229,4 +229,4 @@ struct circuit_t {
   struct circpad_machine_runtime_t *padding_info[CIRCPAD_MAX_MACHINES];
 };
 
-#endif
+#endif /* !defined(CIRCUIT_ST_H) */

+ 2 - 2
src/core/or/circuitpadding.c

@@ -2595,7 +2595,7 @@ circpad_circ_responder_machine_init(void)
   circpad_register_padding_machine(circ_responder_machine,
                                    relay_padding_machines);
 }
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
 
 /**
  * Initialize all of our padding machines.
@@ -2977,4 +2977,4 @@ circpad_string_to_machine(const char *str)
   return NULL;
 }
 
-#endif
+#endif /* 0 */

+ 3 - 3
src/core/or/circuitpadding.h

@@ -10,7 +10,7 @@
 #ifndef TOR_CIRCUITPADDING_H
 #define TOR_CIRCUITPADDING_H
 
-#include "src/trunnel/circpad_negotiation.h"
+#include "trunnel/circpad_negotiation.h"
 #include "lib/evloop/timers.h"
 
 struct circuit_t;
@@ -803,6 +803,6 @@ extern smartlist_t *relay_padding_machines;
 
 #endif
 
-#endif
+#endif /* defined(CIRCUITPADDING_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_CIRCUITPADDING_H) */

+ 2 - 2
src/core/or/circuitpadding_machines.h

@@ -30,6 +30,6 @@ void circpad_machine_client_hide_rend_circuits(smartlist_t *machines_sl);
  *  The actual value will be sampled between the min and max.*/
 #define INTRO_MACHINE_MAXIMUM_PADDING 10
 
-#endif
+#endif /* defined(CIRCUITPADDING_MACHINES_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_CIRCUITPADDING_MACHINES_H) */

+ 1 - 1
src/core/or/connection_st.h

@@ -146,4 +146,4 @@ struct connection_t {
  * directory connection. */
 #define DIR_CONN_IS_SERVER(conn) ((conn)->purpose == DIR_PURPOSE_SERVER)
 
-#endif
+#endif /* !defined(CONNECTION_ST_H) */

+ 1 - 1
src/core/or/cpath_build_state_st.h

@@ -34,5 +34,5 @@ struct cpath_build_state_t {
   time_t expiry_time;
 };
 
-#endif
+#endif /* !defined(CIRCUIT_BUILD_STATE_ST_ST_H) */
 

+ 1 - 1
src/core/or/crypt_path.h

@@ -43,4 +43,4 @@ uint8_t *cpath_get_sendme_digest(crypt_path_t *cpath);
 unsigned int cpath_get_n_hops(crypt_path_t **head_ptr);
 #endif /* defined(TOR_UNIT_TESTS) */
 
-#endif
+#endif /* !defined(CRYPT_PATH_H) */

+ 1 - 1
src/core/or/crypt_path_reference_st.h

@@ -19,5 +19,5 @@ struct crypt_path_reference_t {
   crypt_path_t *cpath;
 };
 
-#endif
+#endif /* !defined(CRYPT_PATH_REFERENCE_ST_H) */
 

+ 2 - 2
src/core/or/crypt_path_st.h

@@ -35,7 +35,7 @@ struct onion_handshake_state_t {
 /* Helper macro to access private members of a struct. */
 #define pvt_crypto CRYPT_PATH_PRIV_FIELD(crypto)
 
-#endif
+#endif /* defined(CRYPT_PATH_PRIVATE) */
 
 /** Holds accounting information for a single step in the layered encryption
  * performed by a circuit.  Used only at the client edge of a circuit. */
@@ -82,4 +82,4 @@ struct crypt_path_t {
   relay_crypto_t CRYPT_PATH_PRIV_FIELD(crypto);
 };
 
-#endif
+#endif /* !defined(CRYPT_PATH_ST_H) */

+ 1 - 1
src/core/or/destroy_cell_queue_st.h

@@ -23,5 +23,5 @@ struct destroy_cell_queue_t {
   int n; /**< The number of cells in the queue. */
 };
 
-#endif
+#endif /* !defined(DESTROY_CELL_QUEUE_ST_H) */
 

+ 2 - 2
src/core/or/dos.h

@@ -134,7 +134,7 @@ MOCK_DECL(STATIC unsigned int, get_param_cc_enabled,
 MOCK_DECL(STATIC unsigned int, get_param_conn_enabled,
           (const networkstatus_t *ns));
 
-#endif /* TOR_DOS_PRIVATE */
+#endif /* defined(DOS_PRIVATE) */
 
-#endif /* TOR_DOS_H */
+#endif /* !defined(TOR_DOS_H) */
 

+ 1 - 1
src/core/or/edge_connection_st.h

@@ -73,5 +73,5 @@ struct edge_connection_t {
   uint64_t dirreq_id;
 };
 
-#endif
+#endif /* !defined(EDGE_CONNECTION_ST_H) */
 

+ 1 - 1
src/core/or/entry_connection_st.h

@@ -96,5 +96,5 @@ struct entry_connection_t {
 /** Cast a entry_connection_t subtype pointer to a edge_connection_t **/
 #define ENTRY_TO_EDGE_CONN(c) (&(((c))->edge_))
 
-#endif
+#endif /* !defined(ENTRY_CONNECTION_ST_H) */
 

+ 1 - 1
src/core/or/entry_port_cfg_st.h

@@ -50,5 +50,5 @@ struct entry_port_cfg_t {
 
 };
 
-#endif
+#endif /* !defined(ENTRY_PORT_CFG_ST_H) */
 

+ 1 - 1
src/core/or/extend_info_st.h

@@ -27,4 +27,4 @@ struct extend_info_t {
   curve25519_public_key_t curve25519_onion_key;
 };
 
-#endif
+#endif /* !defined(EXTEND_INFO_ST_H) */

+ 1 - 1
src/core/or/half_edge_st.h

@@ -30,5 +30,5 @@ typedef struct half_edge_t {
   int connected_pending : 1;
 } half_edge_t;
 
-#endif
+#endif /* !defined(HALF_EDGE_ST_H) */
 

+ 1 - 1
src/core/or/listener_connection_st.h

@@ -21,5 +21,5 @@ struct listener_connection_t {
 
 };
 
-#endif
+#endif /* !defined(LISTENER_CONNECTION_ST_H) */
 

+ 1 - 1
src/core/or/ocirc_event.h

@@ -86,4 +86,4 @@ void ocirc_event_subscribe(ocirc_event_rcvr_t fn);
 void ocirc_event_publish(const ocirc_event_msg_t *msg);
 #endif
 
-#endif  /* defined(TOR_OCIRC_EVENT_STATE_H) */
+#endif /* !defined(TOR_OCIRC_EVENT_H) */

+ 1 - 1
src/core/or/ocirc_event_sys.h

@@ -10,4 +10,4 @@
 
 extern const struct subsys_fns_t sys_ocirc_event;
 
-#endif  /* defined(TOR_OCIRC_EVENT_H) */
+#endif /* !defined(TOR_OCIRC_EVENT_SYS_H) */

+ 1 - 1
src/core/or/or_circuit_st.h

@@ -71,5 +71,5 @@ struct or_circuit_t {
   uint64_t total_cell_waiting_time;
 };
 
-#endif
+#endif /* !defined(OR_CIRCUIT_ST_H) */
 

+ 1 - 1
src/core/or/or_connection_st.h

@@ -91,4 +91,4 @@ struct or_connection_t {
   uint64_t bytes_xmitted, bytes_xmitted_by_tls;
 };
 
-#endif
+#endif /* !defined(OR_CONNECTION_ST_H) */

+ 1 - 1
src/core/or/or_handshake_certs_st.h

@@ -37,4 +37,4 @@ struct or_handshake_certs_t {
   size_t ed_rsa_crosscert_len;
 };
 
-#endif
+#endif /* !defined(OR_HANDSHAKE_CERTS_ST) */

+ 1 - 1
src/core/or/or_handshake_state_st.h

@@ -74,5 +74,5 @@ struct or_handshake_state_t {
   or_handshake_certs_t *certs;
 };
 
-#endif
+#endif /* !defined(OR_HANDSHAKE_STATE_ST) */
 

+ 1 - 1
src/core/or/or_periodic.c

@@ -18,7 +18,7 @@
 #include "core/or/circuituse.h"
 #include "core/or/or_periodic.h"
 
-#include "src/feature/relay/routermode.h"
+#include "feature/relay/routermode.h"
 
 #define DECLARE_EVENT(name, roles, flags)         \
   static periodic_event_item_t name ## _event =   \

+ 1 - 1
src/core/or/orconn_event.h

@@ -117,4 +117,4 @@ void orconn_event_subscribe(orconn_event_rcvr_t);
 void orconn_event_publish(const orconn_event_msg_t *);
 #endif
 
-#endif  /* defined(TOR_ORCONN_EVENT_H) */
+#endif /* !defined(TOR_ORCONN_EVENT_H) */

+ 1 - 1
src/core/or/orconn_event_sys.h

@@ -9,4 +9,4 @@
 
 extern const struct subsys_fns_t sys_orconn_event;
 
-#endif  /* defined(TOR_ORCONN_SYS_H) */
+#endif /* !defined(TOR_ORCONN_EVENT_SYS_H) */

+ 1 - 1
src/core/or/origin_circuit_st.h

@@ -295,4 +295,4 @@ struct origin_circuit_t {
 
 };
 
-#endif
+#endif /* !defined(ORIGIN_CIRCUIT_ST_H) */

+ 1 - 1
src/core/or/port_cfg_st.h

@@ -31,5 +31,5 @@ struct port_cfg_t {
   char unix_addr[FLEXIBLE_ARRAY_MEMBER];
 };
 
-#endif
+#endif /* !defined(PORT_CFG_ST_H) */
 

+ 1 - 1
src/core/or/relay_crypto_st.h

@@ -30,4 +30,4 @@ struct relay_crypto_t {
 };
 #undef crypto_cipher_t
 
-#endif
+#endif /* !defined(RELAY_CRYPTO_ST_H) */

+ 2 - 2
src/core/or/sendme.h

@@ -73,8 +73,8 @@ STATIC bool sendme_is_valid(const circuit_t *circ,
                             const uint8_t *cell_payload,
                             size_t cell_payload_len);
 
-#endif /* TOR_UNIT_TESTS */
+#endif /* defined(TOR_UNIT_TESTS) */
 
-#endif /* SENDME_PRIVATE */
+#endif /* defined(SENDME_PRIVATE) */
 
 #endif /* !defined(TOR_SENDME_H) */

+ 1 - 1
src/core/or/server_port_cfg_st.h

@@ -16,5 +16,5 @@ struct server_port_cfg_t {
   unsigned int bind_ipv6_only : 1;
 };
 
-#endif
+#endif /* !defined(SERVER_PORT_CFG_ST_H) */
 

+ 1 - 1
src/core/or/socks_request_st.h

@@ -74,4 +74,4 @@ struct socks_request_t {
   uint8_t socks5_atyp; /* SOCKS5 address type */
 };
 
-#endif
+#endif /* !defined(SOCKS_REQUEST_ST_H) */

+ 1 - 1
src/core/or/tor_version_st.h

@@ -28,5 +28,5 @@ struct tor_version_t {
   char git_tag[DIGEST_LEN];
 };
 
-#endif
+#endif /* !defined(TOR_VERSION_ST_H) */
 

+ 1 - 1
src/core/or/var_cell_st.h

@@ -19,5 +19,5 @@ struct var_cell_t {
   uint8_t payload[FLEXIBLE_ARRAY_MEMBER];
 };
 
-#endif
+#endif /* !defined(VAR_CELL_ST_H) */
 

+ 2 - 2
src/feature/api/tor_api.c

@@ -40,10 +40,10 @@
 #define raw_socketpair tor_ersatz_socketpair
 #define raw_closesocket closesocket
 #define snprintf _snprintf
-#else
+#else /* !(defined(_WIN32)) */
 #define raw_socketpair socketpair
 #define raw_closesocket close
-#endif
+#endif /* defined(_WIN32) */
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 1 - 1
src/feature/api/tor_api.h

@@ -55,7 +55,7 @@ typedef SOCKET tor_control_socket_t;
 #else
 typedef int tor_control_socket_t;
 #define INVALID_TOR_CONTROL_SOCKET (-1)
-#endif
+#endif /* defined(_WIN32) */
 
 /** DOCDOC */
 tor_control_socket_t tor_main_configuration_setup_control_socket(

+ 1 - 1
src/feature/control/btrack_circuit.h

@@ -12,4 +12,4 @@
 int btrack_circ_init(void);
 void btrack_circ_fini(void);
 
-#endif  /* defined(TOR_BTRACK_CIRCUIT_H) */
+#endif /* !defined(TOR_BTRACK_CIRCUIT_H) */

+ 2 - 2
src/feature/control/btrack_orconn.h

@@ -30,9 +30,9 @@ typedef struct bt_orconn_t {
   bool is_onehop;           /**< Is this for a one-hop circuit? */
 } bt_orconn_t;
 
-#endif  /* defined(BTRACK_ORCONN_PRIVATE) */
+#endif /* defined(BTRACK_ORCONN_PRIVATE) */
 
 int btrack_orconn_init(void);
 void btrack_orconn_fini(void);
 
-#endif  /* defined(TOR_BTRACK_ORCONN_H) */
+#endif /* !defined(TOR_BTRACK_ORCONN_H) */

+ 1 - 1
src/feature/control/btrack_orconn_cevent.h

@@ -15,4 +15,4 @@ void bto_cevent_anyconn(const bt_orconn_t *);
 void bto_cevent_apconn(const bt_orconn_t *);
 void bto_cevent_reset(void);
 
-#endif  /* defined(TOR_BTRACK_ORCONN_CEVENT_H) */
+#endif /* !defined(TOR_BTRACK_ORCONN_CEVENT_H) */

+ 1 - 1
src/feature/control/btrack_orconn_maps.h

@@ -15,4 +15,4 @@ bt_orconn_t *bto_find_or_new(uint64_t, uint64_t);
 void bto_init_maps(void);
 void bto_clear_maps(void);
 
-#endif  /* defined(TOR_BTRACK_ORCONN_MAPS_H) */
+#endif /* !defined(TOR_BTRACK_ORCONN_MAPS_H) */

+ 1 - 1
src/feature/control/btrack_sys.h

@@ -11,4 +11,4 @@
 
 extern const struct subsys_fns_t sys_btrack;
 
-#endif  /* defined(TOR_BTRACK_SYS_H) */
+#endif /* !defined(TOR_BTRACK_SYS_H) */

+ 1 - 1
src/feature/control/control_connection_st.h

@@ -44,4 +44,4 @@ struct control_connection_t {
   char *current_cmd;
 };
 
-#endif
+#endif /* !defined(CONTROL_CONNECTION_ST_H) */

+ 1 - 1
src/feature/control/control_getinfo.h

@@ -58,4 +58,4 @@ STATIC int getinfo_helper_current_time(
     const char **errmsg);
 #endif /* defined(CONTROL_GETINFO_PRIVATE) */
 
-#endif /* !defined(TOR_CONTROL_GETINFO) */
+#endif /* !defined(TOR_CONTROL_GETINFO_H) */

+ 1 - 1
src/feature/control/fmt_serverstatus.h

@@ -15,4 +15,4 @@
 int list_server_status_v1(smartlist_t *routers, char **router_status_out,
                           int for_controller);
 
-#endif
+#endif /* !defined(TOR_FMT_SERVERSTATUS_H) */

+ 1 - 1
src/feature/control/getinfo_geoip.h

@@ -11,4 +11,4 @@ int getinfo_helper_geoip(control_connection_t *control_conn,
                      const char *question, char **answer,
                      const char **errmsg);
 
-#endif
+#endif /* !defined(TOR_GETINFO_GEOIP_H) */

+ 3 - 3
src/feature/dirauth/authmode.h

@@ -29,7 +29,7 @@ authdir_mode_v3(const or_options_t *options)
 
 #define have_module_dirauth() (1)
 
-#else /* HAVE_MODULE_DIRAUTH */
+#else /* !(defined(HAVE_MODULE_DIRAUTH)) */
 
 #define authdir_mode(options) (((void)(options)),0)
 #define authdir_mode_handles_descs(options,purpose) \
@@ -41,6 +41,6 @@ authdir_mode_v3(const or_options_t *options)
 
 #define have_module_dirauth() (0)
 
-#endif /* HAVE_MODULE_DIRAUTH */
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
-#endif /* TOR_MODE_H */
+#endif /* !defined(TOR_DIRAUTH_MODE_H) */

+ 1 - 1
src/feature/dirauth/bridgeauth.h

@@ -9,4 +9,4 @@
 
 void bridgeauth_dump_bridge_status_to_file(time_t now);
 
-#endif
+#endif /* !defined(TOR_DIRAUTH_BRIDGEAUTH_H) */

+ 1 - 1
src/feature/dirauth/bwauth.h

@@ -55,4 +55,4 @@ STATIC void dirserv_cache_measured_bw(const measured_bw_line_t *parsed_line,
 STATIC void dirserv_expire_measured_bw_cache(time_t now);
 #endif /* defined(BWAUTH_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_BWAUTH_H) */

+ 3 - 3
src/feature/dirauth/dirauth_periodic.h

@@ -12,7 +12,7 @@
 void dirauth_register_periodic_events(void);
 void reschedule_dirvote(const or_options_t *options);
 
-#else
+#else /* !(defined(HAVE_MODULE_DIRAUTH)) */
 
 static inline void
 reschedule_dirvote(const or_options_t *options)
@@ -20,6 +20,6 @@ reschedule_dirvote(const or_options_t *options)
   (void)options;
 }
 
-#endif
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
-#endif
+#endif /* !defined(DIRVOTE_PERIODIC_H) */

+ 1 - 1
src/feature/dirauth/dirauth_sys.h

@@ -9,4 +9,4 @@
 
 extern const struct subsys_fns_t sys_dirauth;
 
-#endif
+#endif /* !defined(DIRAUTH_SYS_H) */

+ 2 - 2
src/feature/dirauth/dirvote.h

@@ -128,7 +128,7 @@ struct config_line_t;
 char *format_recommended_version_list(const struct config_line_t *line,
                                       int warn);
 
-#else /* HAVE_MODULE_DIRAUTH */
+#else /* !(defined(HAVE_MODULE_DIRAUTH)) */
 
 static inline time_t
 dirvote_act(const or_options_t *options, time_t now)
@@ -193,7 +193,7 @@ dirvote_add_signatures(const char *detached_signatures_body,
   return 0;
 }
 
-#endif /* HAVE_MODULE_DIRAUTH */
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
 /* Item access */
 MOCK_DECL(const char*, dirvote_get_pending_consensus,

+ 1 - 1
src/feature/dirauth/dsigs_parse.h

@@ -19,4 +19,4 @@ void ns_detached_signatures_free_(ns_detached_signatures_t *s);
 #define ns_detached_signatures_free(s) \
   FREE_AND_NULL(ns_detached_signatures_t, ns_detached_signatures_free_, (s))
 
-#endif
+#endif /* !defined(TOR_DSIGS_PARSE_H) */

+ 1 - 1
src/feature/dirauth/guardfraction.h

@@ -21,4 +21,4 @@ dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str,
 int dirserv_read_guardfraction_file(const char *fname,
                                  smartlist_t *vote_routerstatuses);
 
-#endif
+#endif /* !defined(TOR_GUARDFRACTION_H) */

+ 1 - 1
src/feature/dirauth/ns_detached_signatures_st.h

@@ -18,5 +18,5 @@ struct ns_detached_signatures_t {
                          * document_signature_t */
 };
 
-#endif
+#endif /* !defined(NS_DETACHED_SIGNATURES_ST_H) */
 

+ 1 - 1
src/feature/dirauth/process_descs.h

@@ -36,4 +36,4 @@ void dirserv_set_node_flags_from_authoritative_status(node_t *node,
 
 int dirserv_would_reject_router(const routerstatus_t *rs);
 
-#endif
+#endif /* !defined(TOR_RECV_UPLOADS_H) */

+ 1 - 1
src/feature/dirauth/reachability.h

@@ -33,4 +33,4 @@ int dirserv_should_launch_reachability_test(const routerinfo_t *ri,
 void dirserv_single_reachability_test(time_t now, routerinfo_t *router);
 void dirserv_test_reachability(time_t now);
 
-#endif
+#endif /* !defined(TOR_REACHABILITY_H) */

+ 2 - 2
src/feature/dirauth/recommend_pkg.h

@@ -24,6 +24,6 @@ validate_recommended_package_line(const char *line)
   return 0;
 }
 
-#endif
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
-#endif
+#endif /* !defined(TOR_RECOMMEND_PKG_H) */

+ 2 - 2
src/feature/dirauth/shared_random.h

@@ -110,7 +110,7 @@ int sr_init(int save_to_disk);
 void sr_save_and_cleanup(void);
 void sr_act_post_consensus(const networkstatus_t *consensus);
 
-#else /* HAVE_MODULE_DIRAUTH */
+#else /* !(defined(HAVE_MODULE_DIRAUTH)) */
 
 static inline int
 sr_init(int save_to_disk)
@@ -131,7 +131,7 @@ sr_act_post_consensus(const networkstatus_t *consensus)
   (void) consensus;
 }
 
-#endif /* HAVE_MODULE_DIRAUTH */
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
 /* Public methods used only by dirauth code. */
 

+ 1 - 1
src/feature/dirauth/vote_microdesc_hash_st.h

@@ -18,5 +18,5 @@ struct vote_microdesc_hash_t {
   char *microdesc_hash_line;
 };
 
-#endif
+#endif /* !defined(VOTE_MICRODESC_HASH_ST_H) */
 

+ 3 - 3
src/feature/dirauth/voteflags.h

@@ -25,7 +25,7 @@ void dirauth_set_routerstatus_from_routerinfo(routerstatus_t *rs,
                                               int listbadexits);
 
 void dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil);
-#endif
+#endif /* defined(HAVE_MODULE_DIRAUTH) */
 
 void dirserv_set_bridges_running(time_t now);
 
@@ -34,6 +34,6 @@ void dirserv_set_bridges_running(time_t now);
  * StaleDesc flag. */
 #define DESC_IS_STALE_INTERVAL (18*60*60)
 STATIC void dirserv_set_routerstatus_testing(routerstatus_t *rs);
-#endif
+#endif /* defined(VOTEFLAGS_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_VOTEFLAGS_H) */

+ 1 - 1
src/feature/dircache/cached_dir_st.h

@@ -21,5 +21,5 @@ struct cached_dir_t {
   int refcnt; /**< Reference count for this cached_dir_t. */
 };
 
-#endif
+#endif /* !defined(CACHED_DIR_ST_H) */
 

+ 1 - 1
src/feature/dircache/consdiffmgr.c

@@ -525,7 +525,7 @@ consdiffmgr_add_consensus_nulterm(const char *consensus,
   tor_free(ctmp);
   return r;
 }
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
 
 /**
  * Given a buffer containing a networkstatus consensus, and the results of

+ 1 - 1
src/feature/dircache/dircache.h

@@ -38,6 +38,6 @@ STATIC int parse_hs_version_from_post(const char *url, const char *prefix,
                                       const char **end_pos);
 
 STATIC unsigned parse_accept_encoding_header(const char *h);
-#endif
+#endif /* defined(DIRCACHE_PRIVATE) */
 
 #endif /* !defined(TOR_DIRCACHE_H) */

+ 1 - 1
src/feature/dirclient/dir_server_st.h

@@ -51,4 +51,4 @@ struct dir_server_t {
                                **/
 };
 
-#endif
+#endif /* !defined(DIR_SERVER_ST_H) */

+ 1 - 1
src/feature/dirclient/dirclient.h

@@ -167,6 +167,6 @@ STATIC int handle_response_fetch_consensus(dir_connection_t *conn,
 
 STATIC dirinfo_type_t dir_fetch_type(int dir_purpose, int router_purpose,
                                      const char *resource);
-#endif
+#endif /* defined(DIRCLIENT_PRIVATE) */
 
 #endif /* !defined(TOR_DIRCLIENT_H) */

+ 1 - 1
src/feature/dirclient/dlstatus.h

@@ -53,6 +53,6 @@ STATIC void next_random_exponential_delay_range(int *low_bound_out,
 /* no more than triple the previous delay */
 #define DIR_TEST_NET_RANDOM_MULTIPLIER (2)
 
-#endif
+#endif /* defined(DLSTATUS_PRIVATE) */
 
 #endif /* !defined(TOR_DLSTATUS_H) */

+ 1 - 1
src/feature/dirclient/download_status_st.h

@@ -61,5 +61,5 @@ struct download_status_t {
                         * only updated if backoff == 1 */
 };
 
-#endif
+#endif /* !defined(DOWNLOAD_STATUS_ST_H) */
 

+ 1 - 1
src/feature/dircommon/dir_connection_st.h

@@ -64,4 +64,4 @@ struct dir_connection_t {
 #endif /* defined(MEASUREMENTS_21206) */
 };
 
-#endif
+#endif /* !defined(DIR_CONNECTION_ST_H) */

+ 1 - 1
src/feature/dircommon/vote_timing_st.h

@@ -20,5 +20,5 @@ struct vote_timing_t {
   int dist_delay;
 };
 
-#endif
+#endif /* !defined(VOTE_TIMING_ST_H) */
 

+ 1 - 1
src/feature/dircommon/voting_schedule.h

@@ -61,5 +61,5 @@ time_t voting_schedule_get_start_of_next_interval(time_t now,
                                                   int offset);
 time_t voting_schedule_get_next_valid_after_time(void);
 
-#endif /* TOR_VOTING_SCHEDULE_H */
+#endif /* !defined(TOR_VOTING_SCHEDULE_H) */
 

+ 1 - 1
src/feature/dirparse/microdesc_parse.h

@@ -17,4 +17,4 @@ smartlist_t *microdescs_parse_from_string(const char *s, const char *eos,
                                           saved_location_t where,
                                           smartlist_t *invalid_digests_out);
 
-#endif
+#endif /* !defined(TOR_MICRODESC_PARSE_H) */

+ 2 - 2
src/feature/dirparse/ns_parse.h

@@ -42,6 +42,6 @@ STATIC routerstatus_t *routerstatus_parse_entry_from_string(
                                      vote_routerstatus_t *vote_rs,
                                      int consensus_method,
                                      consensus_flavor_t flav);
-#endif
+#endif /* defined(NS_PARSE_PRIVATE) */
 
-#endif
+#endif /* !defined(TOR_NS_PARSE_H) */

+ 1 - 1
src/feature/dirparse/sigcommon.h

@@ -43,6 +43,6 @@ MOCK_DECL(STATIC int, signed_digest_equals,
 MOCK_DECL(STATIC int, router_compute_hash_final,(char *digest,
                            const char *start, size_t len,
                            digest_algorithm_t alg));
-#endif
+#endif /* defined(SIGCOMMON_PRIVATE) */
 
 #endif /* !defined(TOR_SIGCOMMON_H) */

+ 1 - 1
src/feature/dirparse/signing.h

@@ -20,4 +20,4 @@ int router_append_dirobj_signature(char *buf, size_t buf_len,
                                    const char *digest,
                                    size_t digest_len,
                                    crypto_pk_t *private_key);
-#endif
+#endif /* !defined(TOR_SIGNING_H) */

+ 1 - 1
src/feature/dirparse/unparseable.h

@@ -51,6 +51,6 @@ EXTERN(struct smartlist_t *, descs_dumped)
 MOCK_DECL(STATIC dumped_desc_t *, dump_desc_populate_one_file,
     (const char *dirname, const char *f));
 STATIC void dump_desc_populate_fifo_from_directory(const char *dirname);
-#endif
+#endif /* defined(UNPARSEABLE_PRIVATE) */
 
 #endif /* !defined(TOR_UNPARSEABLE_H) */

+ 2 - 2
src/feature/hibernate/hibernate.c

@@ -57,7 +57,7 @@ hibernating, phase 2:
  * Coverity. Here's a kludge to unconfuse it.
  */
 #   define __INCLUDE_LEVEL__ 2
-# endif /* defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__) */
+#endif /* defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__) */
 #include <systemd/sd-daemon.h>
 #endif /* defined(HAVE_SYSTEMD) */
 
@@ -893,7 +893,7 @@ hibernate_begin(hibernate_state_t new_state, time_t now)
      */
     sd_notifyf(0, "EXTEND_TIMEOUT_USEC=%" PRIu64,
             ((uint64_t)(options->ShutdownWaitLength) + 30) * TOR_USEC_PER_SEC);
-#endif
+#endif /* defined(HAVE_SYSTEMD) */
   } else { /* soft limit reached */
     hibernate_end_time = interval_end_time;
   }

+ 1 - 1
src/feature/hs/hs_service.h

@@ -361,7 +361,7 @@ STATIC hs_service_t *get_first_service(void);
 STATIC hs_service_intro_point_t *service_intro_point_find_by_ident(
                                          const hs_service_t *service,
                                          const hs_ident_circuit_t *ident);
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
 
 /* Service accessors. */
 STATIC hs_service_t *find_service(hs_service_ht *map,

+ 1 - 1
src/feature/hs/hs_stats.h

@@ -15,4 +15,4 @@ uint32_t hs_stats_get_n_introduce2_v2_cells(void);
 void hs_stats_note_service_rendezvous_launch(void);
 uint32_t hs_stats_get_n_rendezvous_launches(void);
 
-#endif
+#endif /* !defined(TOR_HS_STATS_H) */

+ 1 - 1
src/feature/hs/hsdir_index_st.h

@@ -20,5 +20,5 @@ struct hsdir_index_t {
   uint8_t store_second[DIGEST256_LEN];
 };
 
-#endif
+#endif /* !defined(HSDIR_INDEX_ST_H) */
 

+ 1 - 1
src/feature/hs_common/shared_random_client.h

@@ -44,5 +44,5 @@ time_t get_start_time_of_current_round(void);
 
 #endif /* TOR_UNIT_TESTS */
 
-#endif /* TOR_SHARED_RANDOM_CLIENT_H */
+#endif /* !defined(TOR_SHARED_RANDOM_CLIENT_H) */
 

+ 1 - 1
src/feature/keymgt/loadkey.h

@@ -52,4 +52,4 @@ int read_encrypted_secret_key(ed25519_secret_key_t *out,
 int write_encrypted_secret_key(const ed25519_secret_key_t *out,
                                const char *fname);
 
-#endif
+#endif /* !defined(TOR_LOADKEY_H) */

+ 1 - 1
src/feature/nodelist/authcert.h

@@ -57,4 +57,4 @@ MOCK_DECL(download_status_t *, download_status_for_authority_id_and_sk,
 
 void authcert_free_all(void);
 
-#endif
+#endif /* !defined(TOR_AUTHCERT_H) */

+ 1 - 1
src/feature/nodelist/authority_cert_st.h

@@ -28,5 +28,5 @@ struct authority_cert_t {
   uint16_t dir_port;
 };
 
-#endif
+#endif /* !defined(AUTHORITY_CERT_ST_H) */
 

Some files were not shown because too many files changed in this diff