[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9321 [Tor]: Load balance right when we have higher guard rotation periods
#9321: Load balance right when we have higher guard rotation periods
-------------------------+-------------------------------------------------
Reporter: arma | Owner:
Type: project | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version:
Resolution: | Keywords: needs-proposal, tor-auth, tor-
Actual Points: | client, 026-triaged-1
Points: | Parent ID: #11480
-------------------------+-------------------------------------------------
Comment (by teor):
When I merge with 0.2.6.2 master, I get the following conflict:
{{{
<<<<<<< HEAD
uint32_t *bandwidths_kb = tor_calloc(smartlist_len(votes),
sizeof(uint32_t));
uint32_t *measured_bws_kb = tor_calloc(smartlist_len(votes),
sizeof(uint32_t));
=======
uint32_t *bandwidths_kb = tor_calloc(sizeof(uint32_t),
smartlist_len(votes));
uint32_t *measured_bws_kb = tor_calloc(sizeof(uint32_t),
smartlist_len(votes));
uint32_t *measured_guardfraction = tor_calloc(sizeof(uint32_t),
smartlist_len(votes));
>>>>>>> asn/bug9321_draft
}}}
The `tor_calloc_` prototype is:
{{{
void *
tor_calloc_(size_t nmemb, size_t size
}}}
We can resolve it by changing each `tor_calloc` call to use nmemb then
size:
{{{
uint32_t *bandwidths_kb = tor_calloc(smartlist_len(votes),
sizeof(uint32_t));
uint32_t *measured_bws_kb = tor_calloc(smartlist_len(votes),
sizeof(uint32_t));
uint32_t *measured_guardfraction = tor_calloc(smartlist_len(votes),
sizeof(uint32_t));
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9321#comment:33>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs