[tor-commits] [tor/master] dirvote: Rename authority_cert_dup()

nickm at torproject.org nickm at torproject.org
Tue May 1 14:32:50 UTC 2018


commit 35ff2a3b864d921d45aec50f551b59f24e31a512
Author: David Goulet <dgoulet at torproject.org>
Date:   Wed Apr 25 10:05:30 2018 -0400

    dirvote: Rename authority_cert_dup()
    
    Renamed to follow the file namespace.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/or/dirserv.c           | 2 +-
 src/or/dirvote_common.c    | 2 +-
 src/or/dirvote_common.h    | 2 +-
 src/test/test_dir_common.c | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 58294f6cf..1ade52e81 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -3131,7 +3131,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
 
   v3_out->voters = smartlist_new();
   smartlist_add(v3_out->voters, voter);
-  v3_out->cert = authority_cert_dup(cert);
+  v3_out->cert = dirvote_authority_cert_dup(cert);
   v3_out->routerstatus_list = routerstatuses;
   /* Note: networkstatus_digest is unset; it won't get set until we actually
    * format the vote. */
diff --git a/src/or/dirvote_common.c b/src/or/dirvote_common.c
index b34f4fe20..9d2c867c8 100644
--- a/src/or/dirvote_common.c
+++ b/src/or/dirvote_common.c
@@ -200,7 +200,7 @@ dirvote_get_voter_sig_by_alg(const networkstatus_voter_info_t *voter,
 /** Allocate and return a new authority_cert_t with the same contents as
  * <b>cert</b>. */
 authority_cert_t *
-authority_cert_dup(authority_cert_t *cert)
+dirvote_authority_cert_dup(authority_cert_t *cert)
 {
   authority_cert_t *out = tor_malloc(sizeof(authority_cert_t));
   tor_assert(cert);
diff --git a/src/or/dirvote_common.h b/src/or/dirvote_common.h
index 16621244b..07e625937 100644
--- a/src/or/dirvote_common.h
+++ b/src/or/dirvote_common.h
@@ -63,7 +63,7 @@ document_signature_t *dirvote_get_voter_sig_by_alg(
                            digest_algorithm_t alg);
 
 /* Cert manipulation */
-authority_cert_t *authority_cert_dup(authority_cert_t *cert);
+authority_cert_t *dirvote_authority_cert_dup(authority_cert_t *cert);
 
 #endif /* TOR_DIRVOTE_COMMON_H */
 
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index 02d3295ca..8c6d99cce 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -307,7 +307,7 @@ dir_common_construct_vote_1(networkstatus_t **vote, authority_cert_t *cert,
    * Set up a vote; generate it; try to parse it.
    */
   smartlist_add((*vote)->voters, voter);
-  (*vote)->cert = authority_cert_dup(cert);
+  (*vote)->cert = dirvote_authority_cert_dup(cert);
   smartlist_split_string((*vote)->net_params, "circuitwindow=101 foo=990",
                          NULL, 0, 0);
   *n_vrs = 0;
@@ -356,7 +356,7 @@ dir_common_construct_vote_2(networkstatus_t **vote, authority_cert_t *cert,
    * Set up a vote; generate it; try to parse it.
    */
   smartlist_add((*vote)->voters, voter);
-  (*vote)->cert = authority_cert_dup(cert);
+  (*vote)->cert = dirvote_authority_cert_dup(cert);
   if (! (*vote)->net_params)
     (*vote)->net_params = smartlist_new();
   smartlist_split_string((*vote)->net_params,
@@ -407,7 +407,7 @@ dir_common_construct_vote_3(networkstatus_t **vote, authority_cert_t *cert,
    * Set up a vote; generate it; try to parse it.
    */
   smartlist_add((*vote)->voters, voter);
-  (*vote)->cert = authority_cert_dup(cert);
+  (*vote)->cert = dirvote_authority_cert_dup(cert);
   smartlist_split_string((*vote)->net_params, "circuitwindow=80 foo=660",
                          NULL, 0, 0);
   /* add routerstatuses */





More information about the tor-commits mailing list