mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Normalize a few more kinds of whitespace. We now dislike:
- func (args) - if (x){ This doesn't normalize if(x), for(x); while(x), and friends. svn:r2943
This commit is contained in:
parent
fe32c2d141
commit
22dba27d8d
@ -468,7 +468,8 @@ get_uname(void)
|
|||||||
* unix calls fork, on win32 calls beginthread. Returns -1 on failure.
|
* unix calls fork, on win32 calls beginthread. Returns -1 on failure.
|
||||||
* func should not return, but rather should call spawn_exit.
|
* func should not return, but rather should call spawn_exit.
|
||||||
*/
|
*/
|
||||||
int spawn_func(int (*func)(void *), void *data)
|
int
|
||||||
|
spawn_func(int (*func)(void *), void *data)
|
||||||
{
|
{
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
int rv;
|
int rv;
|
||||||
|
@ -597,7 +597,8 @@ int strmap_iter_done(strmap_iter_t *iter)
|
|||||||
/** Remove all entries from <b>map</b>, and deallocate storage for those entries.
|
/** Remove all entries from <b>map</b>, and deallocate storage for those entries.
|
||||||
* If free_val is provided, it is invoked on every value in <b>map</b>.
|
* If free_val is provided, it is invoked on every value in <b>map</b>.
|
||||||
*/
|
*/
|
||||||
void strmap_free(strmap_t *map, void (*free_val)(void*))
|
void
|
||||||
|
strmap_free(strmap_t *map, void (*free_val)(void*))
|
||||||
{
|
{
|
||||||
strmap_entry_t *ent, *next;
|
strmap_entry_t *ent, *next;
|
||||||
for (ent = SPLAY_MIN(strmap_tree, &map->head); ent != NULL; ent = next) {
|
for (ent = SPLAY_MIN(strmap_tree, &map->head); ent != NULL; ent = next) {
|
||||||
|
@ -540,7 +540,8 @@ static const int days_per_month[] =
|
|||||||
/** Return a time_t given a struct tm. The result is given in GMT, and
|
/** Return a time_t given a struct tm. The result is given in GMT, and
|
||||||
* does not account for leap seconds.
|
* does not account for leap seconds.
|
||||||
*/
|
*/
|
||||||
time_t tor_timegm (struct tm *tm) {
|
time_t
|
||||||
|
tor_timegm(struct tm *tm) {
|
||||||
/* This is a pretty ironclad timegm implementation, snarfed from Python2.2.
|
/* This is a pretty ironclad timegm implementation, snarfed from Python2.2.
|
||||||
* It's way more brute-force than fiddling with tzset().
|
* It's way more brute-force than fiddling with tzset().
|
||||||
*/
|
*/
|
||||||
|
@ -604,7 +604,8 @@ dirserv_dump_directory_to_string(char *s, size_t maxlen,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{ int l;
|
{
|
||||||
|
int l;
|
||||||
if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) {
|
if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) {
|
||||||
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
||||||
return -1;
|
return -1;
|
||||||
@ -847,7 +848,8 @@ static int generate_runningrouters(crypto_pk_env_t *private_key)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{ int l;
|
{
|
||||||
|
int l;
|
||||||
if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) {
|
if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) {
|
||||||
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -816,7 +816,8 @@ void rend_services_introduce(void) {
|
|||||||
/* One period has elapsed; we can try building circuits again. */
|
/* One period has elapsed; we can try building circuits again. */
|
||||||
service->intro_period_started = now;
|
service->intro_period_started = now;
|
||||||
service->n_intro_circuits_launched = 0;
|
service->n_intro_circuits_launched = 0;
|
||||||
} else if (service->n_intro_circuits_launched>=MAX_INTRO_CIRCS_PER_PERIOD){
|
} else if (service->n_intro_circuits_launched >=
|
||||||
|
MAX_INTRO_CIRCS_PER_PERIOD) {
|
||||||
/* We have failed too many times in this period; wait for the next
|
/* We have failed too many times in this period; wait for the next
|
||||||
* one before we try again. */
|
* one before we try again. */
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user