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

[or-cvs] Reformat inconsistent function declarations.



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv11873/src/or

Modified Files:
	buffers.c circuitlist.c circuituse.c config.c connection.c 
	directory.c dirserv.c dns.c main.c rendcommon.c rendservice.c 
	rephist.c 
Log Message:
Reformat inconsistent function declarations.

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- buffers.c	24 Sep 2005 21:56:04 -0000	1.170
+++ buffers.c	30 Sep 2005 01:09:52 -0000	1.171
@@ -289,7 +289,8 @@
 
 /** Remove the first <b>n</b> bytes from buf. */
 static INLINE void
-buf_remove_from_front(buf_t *buf, size_t n) {
+buf_remove_from_front(buf_t *buf, size_t n)
+{
   tor_assert(buf->datalen >= n);
   buf->datalen -= n;
   buf_total_used -= n;
@@ -313,7 +314,8 @@
 
 /** Create and return a new buf with capacity <b>size</b>. */
 buf_t *
-buf_new_with_capacity(size_t size) {
+buf_new_with_capacity(size_t size)
+{
   buf_t *buf;
   buf = tor_malloc_zero(sizeof(buf_t));
   buf->magic = BUFFER_MAGIC;
@@ -646,7 +648,8 @@
 
 /** As flush_buf(), but writes data to a TLS connection.
  */
-int flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen)
+int
+flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen)
 {
   int r;
   size_t flushed=0;
@@ -1198,7 +1201,8 @@
 
 /** Log an error and exit if <b>buf</b> is corrupted.
  */
-void assert_buf_ok(buf_t *buf)
+void
+assert_buf_ok(buf_t *buf)
 {
   tor_assert(buf);
   tor_assert(buf->magic == BUFFER_MAGIC);

Index: circuitlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/circuitlist.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- circuitlist.c	29 Sep 2005 20:49:41 -0000	1.57
+++ circuitlist.c	30 Sep 2005 01:09:52 -0000	1.58
@@ -178,7 +178,8 @@
 
 /** Function to make circ-\>state human-readable */
 const char *
-circuit_state_to_string(int state) {
+circuit_state_to_string(int state)
+{
   static char buf[64];
   switch (state) {
     case CIRCUIT_STATE_BUILDING: return "doing handshakes";

Index: circuituse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/circuituse.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- circuituse.c	15 Aug 2005 03:25:39 -0000	1.80
+++ circuituse.c	30 Sep 2005 01:09:52 -0000	1.81
@@ -585,7 +585,8 @@
 
 /** A testing circuit has failed to build. Take whatever stats we want. */
 static void
-circuit_testing_failed(circuit_t *circ, int at_last_hop) {
+circuit_testing_failed(circuit_t *circ, int at_last_hop)
+{
 #if 0
   routerinfo_t *me = router_get_my_routerinfo();
 

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.424
retrieving revision 1.425
diff -u -d -r1.424 -r1.425
--- config.c	23 Sep 2005 20:44:22 -0000	1.424
+++ config.c	30 Sep 2005 01:09:52 -0000	1.425
@@ -3154,7 +3154,8 @@
  * and return the number of bytes specified.  Otherwise, set
  * *<b>ok</b> to false and return 0. */
 static uint64_t
-config_parse_memunit(const char *s, int *ok) {
+config_parse_memunit(const char *s, int *ok)
+{
   return config_parse_units(s, memory_units, ok);
 }
 
@@ -3163,7 +3164,8 @@
  * the provided interval.  Otherwise, set *<b>ok</b> to 0 and return -1.
  */
 static int
-config_parse_interval(const char *s, int *ok) {
+config_parse_interval(const char *s, int *ok)
+{
   uint64_t r;
   r = config_parse_units(s, time_units, ok);
   if (!ok)

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.400
retrieving revision 1.401
diff -u -d -r1.400 -r1.401
--- connection.c	29 Sep 2005 22:59:17 -0000	1.400
+++ connection.c	30 Sep 2005 01:09:52 -0000	1.401
@@ -1637,7 +1637,8 @@
  * is non-zero, conn must be of that state too.
  */
 connection_t *
-connection_get_by_type_state_rendquery(int type, int state, const char *rendquery) {
+connection_get_by_type_state_rendquery(int type, int state, const char *rendquery)
+{
   int i, n;
   connection_t *conn;
   connection_t **carray;

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.294
retrieving revision 1.295
diff -u -d -r1.294 -r1.295
--- directory.c	29 Sep 2005 23:59:36 -0000	1.294
+++ directory.c	30 Sep 2005 01:09:52 -0000	1.295
@@ -1122,7 +1122,8 @@
 /** Read handler for directory connections.  (That's connections <em>to</em>
  * directory servers and connections <em>at</em> directory servers.)
  */
-int connection_dir_process_inbuf(connection_t *conn)
+int
+connection_dir_process_inbuf(connection_t *conn)
 {
   tor_assert(conn);
   tor_assert(conn->type == CONN_TYPE_DIR);

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- dirserv.c	29 Sep 2005 22:59:17 -0000	1.242
+++ dirserv.c	30 Sep 2005 01:09:52 -0000	1.243
@@ -50,7 +50,8 @@
 /** Parse authdir policy strings from the configuration.
  */
 void
-parse_authdir_policy(void) {
+parse_authdir_policy(void)
+{
   addr_policy_t *n;
   if (authdir_reject_policy) {
     addr_policy_free(authdir_reject_policy);

Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- dns.c	23 Sep 2005 00:04:53 -0000	1.169
+++ dns.c	30 Sep 2005 01:09:52 -0000	1.170
@@ -81,8 +81,10 @@
 
 /** Function to compare hashed resolves on their addresses; used to
  * implement splay trees. */
-static int compare_cached_resolves(cached_resolve_t *a,
-                                   cached_resolve_t *b) {
+static int
+compare_cached_resolves(cached_resolve_t *a,
+                        cached_resolve_t *b)
+{
   /* make this smarter one day? */
   return strncmp(a->address, b->address, MAX_ADDRESSLEN);
 }

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.560
retrieving revision 1.561
diff -u -d -r1.560 -r1.561
--- main.c	29 Sep 2005 23:26:42 -0000	1.560
+++ main.c	30 Sep 2005 01:09:52 -0000	1.561
@@ -1377,7 +1377,8 @@
 
 /** Do whatever cleanup is necessary before shutting Tor down. */
 void
-tor_cleanup(void) {
+tor_cleanup(void)
+{
   or_options_t *options = get_options();
   /* Remove our pid file. We don't care if there was an error when we
    * unlink, nothing we could do about it anyways. */
@@ -1442,7 +1443,8 @@
 /** Checks if torrc is present in the same directory
  *  as the service executable.
  *  Return 1 if it is, 0 if it is not present. */
-static int nt_torrc_is_present()
+static int
+nt_torrc_is_present()
 {
   HANDLE hFile;
   TCHAR szPath[_MAX_PATH];

Index: rendcommon.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/rendcommon.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- rendcommon.c	9 Sep 2005 20:58:44 -0000	1.55
+++ rendcommon.c	30 Sep 2005 01:09:52 -0000	1.56
@@ -12,13 +12,16 @@
 #include "or.h"
 
 /** Return 0 if one and two are the same service ids, else -1 or 1 */
-int rend_cmp_service_ids(const char *one, const char *two) {
+int
+rend_cmp_service_ids(const char *one, const char *two)
+{
   return strcasecmp(one,two);
 }
 
 /** Free the storage held by the service descriptor <b>desc</b>.
  */
-void rend_service_descriptor_free(rend_service_descriptor_t *desc)
+void
+rend_service_descriptor_free(rend_service_descriptor_t *desc)
 {
   int i;
   if (desc->pk)

Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/rendservice.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- rendservice.c	9 Sep 2005 19:54:28 -0000	1.138
+++ rendservice.c	30 Sep 2005 01:09:52 -0000	1.139
@@ -62,7 +62,9 @@
 static smartlist_t *rend_service_list = NULL;
 
 /** Return the number of rendezvous services we have configured. */
-int num_rend_services(void) {
+int
+num_rend_services(void)
+{
   if (!rend_service_list)
     return 0;
   return smartlist_len(rend_service_list);
@@ -374,7 +376,8 @@
  * to have good uptime. Else return 0.
  */
 static int
-rend_service_requires_uptime(rend_service_t *service) {
+rend_service_requires_uptime(rend_service_t *service)
+{
   int i;
   rend_service_port_config_t *p;
 

Index: rephist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/rephist.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- rephist.c	23 Sep 2005 17:02:50 -0000	1.65
+++ rephist.c	30 Sep 2005 01:09:52 -0000	1.66
@@ -766,8 +766,15 @@
 }
 
 /* not used yet */
-void rep_hist_note_used_resolve(time_t now) { }
-int rep_hist_get_predicted_resolve(time_t now) { return 0; }
+void
+rep_hist_note_used_resolve(time_t now)
+{
+}
+int
+rep_hist_get_predicted_resolve(time_t now)
+{
+  return 0;
+}
 
 /** Free all storage held by the OR/link history caches, by the
  * bandwidth history arrays, or by the port history. */