[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Normalize a few more kinds of whitespace. We now dislike:



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv29140/src/or

Modified Files:
	connection_edge.c directory.c dirserv.c rendservice.c router.c 
	routerparse.c test.c 
Log Message:
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.



Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- connection_edge.c	21 Nov 2004 11:30:33 -0000	1.237
+++ connection_edge.c	22 Nov 2004 23:28:26 -0000	1.238
@@ -761,7 +761,7 @@
     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;
   }

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- directory.c	21 Nov 2004 10:14:57 -0000	1.169
+++ directory.c	22 Nov 2004 23:28:26 -0000	1.170
@@ -594,7 +594,7 @@
       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.");

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- dirserv.c	15 Nov 2004 16:17:59 -0000	1.121
+++ dirserv.c	22 Nov 2004 23:28:26 -0000	1.122
@@ -604,8 +604,9 @@
     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 @@
     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;
     }

Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/rendservice.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- rendservice.c	15 Nov 2004 09:05:54 -0000	1.105
+++ rendservice.c	22 Nov 2004 23:28:26 -0000	1.106
@@ -378,7 +378,7 @@
 
   /* 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 @@
       /* 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;

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- router.c	22 Nov 2004 22:24:10 -0000	1.125
+++ router.c	22 Nov 2004 23:28:26 -0000	1.126
@@ -366,7 +366,7 @@
   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;

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- routerparse.c	15 Nov 2004 16:17:59 -0000	1.81
+++ routerparse.c	22 Nov 2004 23:28:26 -0000	1.82
@@ -886,7 +886,7 @@
   }
   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;
   }
 

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- test.c	12 Nov 2004 21:14:06 -0000	1.147
+++ test.c	22 Nov 2004 23:28:26 -0000	1.148
@@ -1218,7 +1218,7 @@
 }
 
 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);