]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix some types on container fns
authorNick Mathewson <nickm@torproject.org>
Fri, 14 Aug 2015 02:14:14 +0000 (22:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 14 Aug 2015 02:14:14 +0000 (22:14 -0400)
src/common/container.c
src/common/container.h
src/or/dirvote.c

index 082afb51ee32c56cda3103f775cea95fcc1b2f9c..636dfb6c57c435cd76641269b694014c0ae9013b 100644 (file)
@@ -742,7 +742,7 @@ smartlist_sort_strings(smartlist_t *sl)
 }
 
 /** Return the most frequent string in the sorted list <b>sl</b> */
-char *
+const char *
 smartlist_get_most_frequent_string(smartlist_t *sl)
 {
   return smartlist_get_most_frequent(sl, compare_string_ptrs_);
@@ -752,7 +752,7 @@ smartlist_get_most_frequent_string(smartlist_t *sl)
  * If <b>count_out</b> is provided, set <b>count_out</b> to the
  * number of times that string appears.
  */
-char *
+const char *
 smartlist_get_most_frequent_string_(smartlist_t *sl, int *count_out)
 {
   return smartlist_get_most_frequent_(sl, compare_string_ptrs_, count_out);
@@ -1020,7 +1020,7 @@ smartlist_sort_digests256(smartlist_t *sl)
 
 /** Return the most frequent member of the sorted list of DIGEST256_LEN
  * digests in <b>sl</b> */
-char *
+const uint8_t *
 smartlist_get_most_frequent_digest256(smartlist_t *sl)
 {
   return smartlist_get_most_frequent(sl, compare_digests256_);
index 2a6ba01e6237d9c854ca3a86b62c8e335a0999da..5abd8b48d945d4a8ed78c65acd65ef17816f9492 100644 (file)
@@ -109,9 +109,9 @@ void smartlist_sort_digests(smartlist_t *sl);
 void smartlist_sort_digests256(smartlist_t *sl);
 void smartlist_sort_pointers(smartlist_t *sl);
 
-char *smartlist_get_most_frequent_string(smartlist_t *sl);
-char *smartlist_get_most_frequent_string_(smartlist_t *sl, int *count_out);
-char *smartlist_get_most_frequent_digest256(smartlist_t *sl);
+const char *smartlist_get_most_frequent_string(smartlist_t *sl);
+const char *smartlist_get_most_frequent_string_(smartlist_t *sl, int *count_out);
+const uint8_t *smartlist_get_most_frequent_digest256(smartlist_t *sl);
 
 void smartlist_uniq_strings(smartlist_t *sl);
 void smartlist_uniq_digests(smartlist_t *sl);
index 0f3b77fe281a4b9ba3874623cd134e94470225a3..d8e6ee2229045f202ccd025b9c7b384b53d2cd00 100644 (file)
@@ -478,7 +478,7 @@ compute_routerstatus_consensus(smartlist_t *votes, int consensus_method,
 
   if (microdesc_digest256_out) {
     smartlist_t *digests = smartlist_new();
-    const char *best_microdesc_digest;
+    const uint8_t *best_microdesc_digest;
     SMARTLIST_FOREACH_BEGIN(votes, vote_routerstatus_t *, rs) {
         char d[DIGEST256_LEN];
         if (compare_vote_rs(rs, most))