[tor-bugs] #32415 [Core Tor/Tor]: Rename every struct we declare to end with _t.

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 7 13:25:34 UTC 2019


#32415: Rename every struct we declare to end with _t.
--------------------------+------------------------------------
 Reporter:  nickm         |          Owner:  (none)
     Type:  task          |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:  .1
 Reviewer:                |        Sponsor:  Sponsor31-can
--------------------------+------------------------------------

Comment (by nickm):

 Here is a list:

 {{{
 src/app/main/ntmain.c:struct service_fns {
 src/core/mainloop/cpuworker.c:typedef struct worker_state_s {
 src/core/mainloop/cpuworker.c:typedef struct cpuworker_job_u {
 src/core/or/channel.c:typedef struct channel_idmap_entry_s {
 src/core/or/channel.h:struct channel_s {
 src/core/or/channel.h:struct channel_listener_s {
 src/core/or/channeltls.h:struct channel_tls_s {
 src/core/or/circuitmux.c:struct circuit_muxinfo_s {
 src/core/or/circuitmux.h:struct circuitmux_policy_s {
 src/core/or/circuitmux.h:struct circuitmux_policy_data_s {
 src/core/or/circuitmux.h:struct circuitmux_policy_circ_data_s {
 src/core/or/circuitmux.h:struct circuitmux_s {
 src/core/or/circuitmux_ewma.h:struct cell_ewma_s {
 src/core/or/circuitmux_ewma.h:struct ewma_policy_data_s {
 src/core/or/circuitmux_ewma.h:struct ewma_policy_circ_data_s {
 src/core/or/circuitstats.h:struct circuit_build_times_s {
 src/core/or/relay.h:typedef struct address_ttl_s {
 src/core/or/scheduler.h:typedef struct scheduler_s {
 src/core/or/scheduler.h:typedef struct socket_table_ent_s {
 src/core/or/scheduler_kist.c:typedef struct outbuf_table_ent_s {
 src/feature/client/entrynodes.h:struct guard_selection_s {
 src/feature/control/control_events.c:typedef struct queued_event_s {
 src/feature/control/control_events.c:static struct cached_bw_event_s {
 src/feature/dirauth/bwauth.c:typedef struct mbw_cache_entry_s {
 src/feature/dirauth/dircollate.c:typedef struct ddmap_entry_s {
 src/feature/dirauth/dircollate.h:struct dircollator_s {
 src/feature/dircache/dircache.c:typedef struct url_table_ent_s {
 src/feature/dircommon/fp_pair.c:struct fp_pair_map_entry_s {
 src/feature/dircommon/fp_pair.c:struct fp_pair_map_s {
 src/lib/cc/compat_compiler.h: *   struct a { int foo; int bar; } x;
 src/lib/cc/compat_compiler.h: *   struct base { ... };
 src/lib/cc/compat_compiler.h: *   struct subtype { int x; struct base b; }
 x;
 src/lib/container/handles.h: *     struct walrus {
 src/lib/container/map.c:  struct maptype {
 \
 src/lib/crypt_ops/aes_openssl.c:struct aes_cnt_cipher {
 src/lib/crypt_ops/crypto_rand_fast.c:  struct cbuf {
 src/lib/evloop/compat_libevent.h:typedef struct tor_libevent_cfg {
 src/lib/evloop/timers.c:struct timeout_cb {
 src/lib/evloop/workqueue.c:struct threadpool_s {
 src/lib/evloop/workqueue.c:struct workqueue_entry_s {
 src/lib/evloop/workqueue.c:struct replyqueue_s {
 src/lib/evloop/workqueue.c:typedef struct workerthread_s {
 src/lib/math/prob_distr.h:*     struct foo {
 src/lib/math/prob_distr.h:struct dist_ops {
 src/lib/math/prob_distr.h:struct geometric {
 src/lib/math/prob_distr.h:struct genpareto {
 src/lib/math/prob_distr.h:struct weibull {
 src/lib/math/prob_distr.h:struct log_logistic {
 src/lib/math/prob_distr.h:struct logistic {
 src/lib/math/prob_distr.h:struct uniform {
 src/lib/net/inaddr_st.h:struct sockaddr_in6 {
 src/lib/sandbox/sandbox.c:#define SCMP_CMP(a,b,c) ((struct
 scmp_arg_cmp){(a),(b),(c),0})
 src/lib/sandbox/sandbox.c:  ((struct scmp_arg_cmp)
 {(a),(b),(intptr_t)(void*)(c),0})
 src/lib/sandbox/sandbox.c:#define SCMP_CMP4(a,b,c,d) ((struct
 scmp_arg_cmp){(a),(b),(c),(d)})
 src/lib/sandbox/sandbox.h:typedef struct smp_param {
 src/lib/sandbox/sandbox.h:struct sandbox_cfg_elem {
 src/lib/thread/threads.h:typedef struct tor_threadlocal_s {
 src/lib/time/compat_time.h:struct timeval {
 src/test/test-memwipe.c:static struct testcase {
 src/test/test_addr.c:  static const struct loopback_item {
 src/test/test_dispatch.c:struct coord { int x; int y; };
 src/test/test_link_handshake.c:typedef struct certs_data_s {
 src/test/test_link_handshake.c:typedef struct authchallenge_data_s {
 src/test/test_link_handshake.c:typedef struct authenticate_data_s {
 src/test/test_threads.c:typedef struct cv_testinfo_s {
 src/test/test_workqueue.c:typedef struct state_s {
 src/test/test_workqueue.c:typedef struct rsa_work_s {
 src/test/test_workqueue.c:typedef struct ecdh_work_s {
 }}}

 I made it with the command:
 {{{
 git grep 'struct *[a-zA-Z0-9_]*[^t ] *{' \
       src/{app,core,feature,lib,test,tools} |grep -v '^static '
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32415#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list