]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Code Style: Delete PRIVATE defines that are never used
authorteor <teor@torproject.org>
Mon, 25 Nov 2019 23:07:47 +0000 (09:07 +1000)
committerteor <teor@torproject.org>
Thu, 19 Dec 2019 23:50:50 +0000 (09:50 +1000)
Some ".c" files define *_PRIVATE macros, but those macros are
not used in any header file. Delete them.

These changes were created using the "make autostyle" from
32522, and then split into commits.

19 files changed:
src/core/mainloop/connection.c
src/core/or/circuitlist.c
src/feature/dirauth/guardfraction.h
src/feature/dircache/dirserv.c
src/feature/dircommon/voting_schedule.c
src/feature/hs/hs_config.c
src/feature/hs_common/shared_random_client.c
src/feature/relay/selftest.c
src/lib/crypt_ops/crypto_rand_fast.c
src/lib/crypt_ops/crypto_util.c
src/lib/net/socket.c
src/test/fakecircs.c
src/test/test_bridges.c
src/test/test_dir.c
src/test/test_procmon.c
src/test/test_pt.c
src/test/test_util.c
src/test/test_util_format.c
src/test/test_util_process.c

index 368041f92497c85e0b55f2e1c37d3980a9f940fd..3693e1d71545c3c41c8305e1660607958e62bf22 100644 (file)
@@ -66,7 +66,6 @@
  * part of a subclass (channel_tls_t).
  */
 #define TOR_CHANNEL_INTERNAL_
-#define CONNECTION_PRIVATE
 #include "app/config/config.h"
 #include "core/mainloop/connection.h"
 #include "core/mainloop/mainloop.h"
index 49a63c50a168118199fd3320cad1b59b01acdf33..c67b19f065b6cf848eff1163480aa6c876b361b0 100644 (file)
@@ -99,7 +99,6 @@
 #include "lib/compress/compress_zstd.h"
 #include "lib/buf/buffers.h"
 
-#define OCIRC_EVENT_PRIVATE
 #include "core/or/ocirc_event.h"
 
 #include "ht.h"
index 9f01ded8389e12b0c2678d146cf508a63e6259d0..cae4777605eb20b0f91d0054ed9d4fb9450ec88f 100644 (file)
@@ -16,7 +16,7 @@
 STATIC int
 dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str,
                                       smartlist_t *vote_routerstatuses);
-#endif /* defined(DIRSERV_PRIVATE) */
+#endif
 
 int dirserv_read_guardfraction_file(const char *fname,
                                  smartlist_t *vote_routerstatuses);
index 85331bfeaa2467242509343f7ec4fe9dbfbf7e8f..53bb9814a725f740d2051206bed26c389bac437c 100644 (file)
@@ -3,7 +3,6 @@
  * Copyright (c) 2007-2019, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#define DIRSERV_PRIVATE
 #include "core/or/or.h"
 
 #include "app/config/config.h"
index 5576ec69f70b75e0435ec42f19c42e33f50604f1..76915f6be2d8c0dbaa21bbe7e44a98b59b1128b8 100644 (file)
@@ -8,7 +8,6 @@
  *        tor. The full feature is built as part of the dirauth module.
  **/
 
-#define VOTING_SCHEDULE_PRIVATE
 #include "feature/dircommon/voting_schedule.h"
 
 #include "core/or/or.h"
index ed577daf7d0f171573a45272f09279612e83bea9..3c302e70b34f9561fe644ae749e94e22311ca3ea 100644 (file)
@@ -23,8 +23,6 @@
  * every option that is common to all version (config_generic_service).
  **/
 
-#define HS_CONFIG_PRIVATE
-
 #include "feature/hs/hs_common.h"
 #include "feature/hs/hs_config.h"
 #include "feature/hs/hs_client.h"
index f5328e6e10f3a651fe0be098d6930e6dfc69ebe2..999472a8621bc31880c5d497fd19a6c61db16958 100644 (file)
@@ -8,7 +8,6 @@
  *        as part of the dirauth module.
  **/
 
-#define SHARED_RANDOM_CLIENT_PRIVATE
 #include "feature/hs_common/shared_random_client.h"
 
 #include "app/config/config.h"
index f8b54ff45d873279d36b094a903862c29abc87b0..abc87437d12641f69e5bf539c2b7707bd1d3d072 100644 (file)
@@ -12,8 +12,6 @@
  * their own bandwidth, before publishing.
  */
 
-#define SELFTEST_PRIVATE
-
 #include "core/or/or.h"
 
 #include "app/config/config.h"
index 8625ebd1c9942115e292bf50c6dcf5f65ea8e9b2..166c67c87b5d9f171712ebfed84ada2500ce1dca 100644 (file)
@@ -32,7 +32,6 @@
  * request.
  */
 
-#define CRYPTO_RAND_FAST_PRIVATE
 #define CRYPTO_PRIVATE
 
 #include "lib/crypt_ops/crypto_rand.h"
index 5e3f4a87a1023c1cb3aa375da548b642f1bd5d30..beb45792ad908efb99a1adfc1bc70a79ae9575c9 100644 (file)
@@ -10,8 +10,6 @@
  * \brief Common cryptographic utilities.
  **/
 
-#define CRYPTO_UTIL_PRIVATE
-
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/cc/compat_compiler.h"
 
index e1b82251edfd600d03bc4d67ca35c39900bae84a..b25be91f486fad17b591ed68c5f503945262606d 100644 (file)
@@ -9,7 +9,6 @@
  *    sockets.
  **/
 
-#define SOCKET_PRIVATE
 #include "lib/net/socket.h"
 #include "lib/net/socketpair.h"
 #include "lib/net/address.h"
index cb8dafc6b30f135ba1d9e94fb61838b7d46b9a3f..369a85d7b3342715b46091453aa717facde1fe39 100644 (file)
@@ -6,7 +6,6 @@
  * \brief Fake circuits API for unit test.
  **/
 
-#define CHANNEL_PRIVATE
 #define CIRCUITBUILD_PRIVATE
 #define CIRCUITLIST_PRIVATE
 #define CRYPT_PATH_PRIVATE
index 879ae6636bef6f051c1260f1cdcf9c8e8967f7de..5dd3d055410e16e1f36222680090a5b129c3a975 100644 (file)
@@ -550,8 +550,6 @@ test_bridges_get_transport_by_bridge_addrport_no_ptlist(void *arg)
   sweep_bridge_list();
 }
 
-#define PT_PRIVATE
-
 /**
  * Calling get_transport_by_bridge_addrport() with the address and port of a
  * configured bridge which uses a pluggable transport should return 0 and set
index 02465b07f04eb8b2ac59995379b1bbb5ac4cff7c..523c0719fb882ad23fe73918df5e8fe8bdd6b504 100644 (file)
@@ -11,7 +11,6 @@
 #define CONTROL_GETINFO_PRIVATE
 #define DIRCACHE_PRIVATE
 #define DIRCLIENT_PRIVATE
-#define DIRSERV_PRIVATE
 #define DIRVOTE_PRIVATE
 #define DLSTATUS_PRIVATE
 #define HIBERNATE_PRIVATE
index e23578f4fdbc89b2d4b8fe0c0a0398a6ec031e54..4ade82470b7b3bc346060972a94f92168a520c72 100644 (file)
@@ -1,7 +1,6 @@
 /* Copyright (c) 2010-2019, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#define PROCMON_PRIVATE
 #include "orconfig.h"
 #include "core/or/or.h"
 #include "test/test.h"
index 0e391c1baa211bf3250c8b539869d2220b3e655d..268848b982e72eeba5818df3c05e07a8a654915c 100644 (file)
@@ -5,7 +5,6 @@
 
 #include "orconfig.h"
 #define PT_PRIVATE
-#define UTIL_PRIVATE
 #define STATEFILE_PRIVATE
 #define CONTROL_EVENTS_PRIVATE
 #define PROCESS_PRIVATE
index 5f46e4fcff8046b861666294753826dac371da19..7f7e157c17f9bd0eebd21f2c36fb219fc11c217b 100644 (file)
@@ -4,11 +4,8 @@
 /* See LICENSE for licensing information */
 
 #include "orconfig.h"
-#define COMPAT_PRIVATE
 #define COMPAT_TIME_PRIVATE
-#define UTIL_PRIVATE
 #define UTIL_MALLOC_PRIVATE
-#define SOCKET_PRIVATE
 #define PROCESS_WIN32_PRIVATE
 #include "lib/testsupport/testsupport.h"
 #include "core/or/or.h"
index 2859da66b2e515a80f0af5c613a0856ac8551e47..57c3eee5be8c7cec2ee609dbca17670ecf34d7d0 100644 (file)
@@ -7,7 +7,6 @@
 #include "test/test.h"
 
 #include "lib/crypt_ops/crypto_rand.h"
-#define UTIL_FORMAT_PRIVATE
 #include "lib/encoding/binascii.h"
 
 #define NS_MODULE util_format
index 4d04eb6dfc71024dd225ac223218c9463b2b776e..9c78a8c0e4380e6b2eb8e55b2b52c75fc8e71b89 100644 (file)
@@ -1,7 +1,6 @@
 /* Copyright (c) 2010-2019, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#define UTIL_PROCESS_PRIVATE
 #include "orconfig.h"
 #include "core/or/or.h"