diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-22 23:28:26 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-22 23:28:26 +0000 |
commit | 22dba27d8dd55e3494775b9241e258e494caf5d3 (patch) | |
tree | 8e3e1a756c6efc65d8211e884bf5c5b9dd60dea1 /src/or | |
parent | fe32c2d1412e7a3906fa4f0ae0f99f12de5b882b (diff) | |
download | tor-22dba27d8dd55e3494775b9241e258e494caf5d3.tar.gz tor-22dba27d8dd55e3494775b9241e258e494caf5d3.zip |
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
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 2 | ||||
-rw-r--r-- | src/or/directory.c | 2 | ||||
-rw-r--r-- | src/or/dirserv.c | 10 | ||||
-rw-r--r-- | src/or/rendservice.c | 5 | ||||
-rw-r--r-- | src/or/router.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 2 | ||||
-rw-r--r-- | src/or/test.c | 2 |
7 files changed, 14 insertions, 11 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index be3b07a25f..4ba528c488 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -761,7 +761,7 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) { log_fn(LOG_WARN,"relay begin cell has no \\0. Dropping."); return 0; } - if (parse_addr_port(cell->payload+RELAY_HEADER_SIZE, &address, NULL,&port)<0){ + if (parse_addr_port(cell->payload+RELAY_HEADER_SIZE,&address,NULL,&port)<0) { log_fn(LOG_WARN,"Unable to parse addr:port in relay begin cell. Dropping."); return 0; } diff --git a/src/or/directory.c b/src/or/directory.c index 6273b904c1..68600b59c0 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -594,7 +594,7 @@ connection_dir_client_reached_eof(connection_t *conn) tor_free(body); tor_free(headers); return -1; } - if(router_load_routerlist_from_directory(body, NULL, 1) < 0){ + if(router_load_routerlist_from_directory(body, NULL, 1) < 0) { log_fn(LOG_WARN,"I failed to parse the directory I fetched from %s:%d. Ignoring.", conn->address, conn->port); } else { log_fn(LOG_INFO,"updated routers."); diff --git a/src/or/dirserv.c b/src/or/dirserv.c index e96adc0a71..5af1e928c3 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -604,8 +604,9 @@ dirserv_dump_directory_to_string(char *s, size_t maxlen, return -1; } #else - { int l; - if(crypto_pk_write_public_key_to_string(private_key, &identity_pkey, &l)<0){ + { + int l; + if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) { log_fn(LOG_WARN,"write identity_pkey to string failed!"); return -1; } @@ -847,8 +848,9 @@ static int generate_runningrouters(crypto_pk_env_t *private_key) goto err; } #else - { int l; - if(crypto_pk_write_public_key_to_string(private_key, &identity_pkey, &l)<0){ + { + int l; + if(crypto_pk_write_public_key_to_string(private_key,&identity_pkey,&l)<0) { log_fn(LOG_WARN,"write identity_pkey to string failed!"); goto err; } diff --git a/src/or/rendservice.c b/src/or/rendservice.c index a38b536603..d8e86e68f2 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -378,7 +378,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l /* min key length plus digest length plus nickname length */ if (request_len < DIGEST_LEN+REND_COOKIE_LEN+(MAX_NICKNAME_LEN+1)+ - DH_KEY_LEN+42){ + DH_KEY_LEN+42) { log_fn(LOG_WARN, "Got a truncated INTRODUCE2 cell on circ %d", circuit->n_circ_id); return -1; @@ -816,7 +816,8 @@ void rend_services_introduce(void) { /* One period has elapsed; we can try building circuits again. */ service->intro_period_started = now; 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 * one before we try again. */ continue; diff --git a/src/or/router.c b/src/or/router.c index 9690860954..c9b7467d25 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -366,7 +366,7 @@ int init_keys(void) { if(!cp) { log_fn(LOG_INFO,"Cached directory %s not present. Ok.",keydir); } else { - if(dirserv_load_from_directory_string(cp) < 0){ + if(dirserv_load_from_directory_string(cp) < 0) { log_fn(LOG_ERR, "Cached directory %s is corrupt", keydir); tor_free(cp); return -1; diff --git a/src/or/routerparse.c b/src/or/routerparse.c index ca7d6ed5d3..f568d550f2 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -886,7 +886,7 @@ routerinfo_t *router_parse_entry_from_string(const char *s, } router->identity_pkey = tok->key; tok->key = NULL; /* Prevent free */ - if (crypto_pk_get_digest(router->identity_pkey,router->identity_digest)){ + if (crypto_pk_get_digest(router->identity_pkey,router->identity_digest)) { log_fn(LOG_WARN, "Couldn't calculate key digest"); goto err; } diff --git a/src/or/test.c b/src/or/test.c index 056ec93004..844cc74288 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -1218,7 +1218,7 @@ test_rend_fns(void) } int -main(int c, char**v){ +main(int c, char**v) { or_options_t *options = tor_malloc_zero(sizeof(or_options_t)); options_init(options); set_options(options); |