Fix a pair of compilation errors.

This commit is contained in:
Nick Mathewson 2017-01-23 14:52:51 -05:00
parent 1d8e9e8c69
commit 2202ad7ab0
3 changed files with 5 additions and 3 deletions

View File

@ -243,7 +243,7 @@ router_reload_consensus_networkstatus(void)
} }
/** Free all storage held by the vote_routerstatus object <b>rs</b>. */ /** Free all storage held by the vote_routerstatus object <b>rs</b>. */
STATIC void void
vote_routerstatus_free(vote_routerstatus_t *rs) vote_routerstatus_free(vote_routerstatus_t *rs)
{ {
vote_microdesc_hash_t *h, *next; vote_microdesc_hash_t *h, *next;

View File

@ -132,8 +132,9 @@ document_signature_t *document_signature_dup(const document_signature_t *sig);
void networkstatus_free_all(void); void networkstatus_free_all(void);
int networkstatus_get_weight_scale_param(networkstatus_t *ns); int networkstatus_get_weight_scale_param(networkstatus_t *ns);
void vote_routerstatus_free(vote_routerstatus_t *rs);
#ifdef NETWORKSTATUS_PRIVATE #ifdef NETWORKSTATUS_PRIVATE
STATIC void vote_routerstatus_free(vote_routerstatus_t *rs);
#ifdef TOR_UNIT_TESTS #ifdef TOR_UNIT_TESTS
STATIC int networkstatus_set_current_consensus_from_ns(networkstatus_t *c, STATIC int networkstatus_set_current_consensus_from_ns(networkstatus_t *c,
const char *flavor); const char *flavor);

View File

@ -45,7 +45,8 @@ fuzz_cleanup(void)
int int
fuzz_main(const uint8_t *data, size_t sz) fuzz_main(const uint8_t *data, size_t sz)
{ {
char *str = tor_memdup_nulterm(data, sz), *s; char *str = tor_memdup_nulterm(data, sz);
const char *s;
routerstatus_t *rs_ns = NULL, *rs_md = NULL, *rs_vote = NULL; routerstatus_t *rs_ns = NULL, *rs_md = NULL, *rs_vote = NULL;
vote_routerstatus_t *vrs = tor_malloc_zero(sizeof(*vrs)); vote_routerstatus_t *vrs = tor_malloc_zero(sizeof(*vrs));
smartlist_t *tokens = smartlist_new(); smartlist_t *tokens = smartlist_new();