[or-cvs] r16535: {tor} This bunch of functions really should be static (tor/trunk/src/or)

weasel at seul.org weasel at seul.org
Thu Aug 14 11:24:04 UTC 2008


Author: weasel
Date: 2008-08-14 07:24:03 -0400 (Thu, 14 Aug 2008)
New Revision: 16535

Modified:
   tor/trunk/src/or/policies.c
Log:
This bunch of functions really should be static

Modified: tor/trunk/src/or/policies.c
===================================================================
--- tor/trunk/src/or/policies.c	2008-08-14 08:34:57 UTC (rev 16534)
+++ tor/trunk/src/or/policies.c	2008-08-14 11:24:03 UTC (rev 16535)
@@ -47,16 +47,6 @@
     int accepted:1; /** Has this port already been accepted */
 } policy_summary_item_t;
 
-smartlist_t *policy_summary_create(void);
-void policy_summary_accept(smartlist_t *summary,
-                           uint16_t prt_min, uint16_t prt_max);
-void policy_summary_reject(smartlist_t *summary, maskbits_t maskbits,
-                           uint16_t prt_min, uint16_t prt_max);
-void policy_summary_add_item(smartlist_t *summary, addr_policy_t *p);
-int policy_summary_split(smartlist_t *summary,
-                         uint16_t prt_min, uint16_t prt_max);
-policy_summary_item_t* policy_summary_item_split(policy_summary_item_t* old,
-                                                 uint16_t new_starts);
 
 /** Private networks.  This list is used in two places, once to expand the
  *  "private" keyword when parsing our own exit policy, secondly to ignore
@@ -935,7 +925,7 @@
  *  port 1-64k item */
 /* XXXX This entire thing will do most stuff in O(N^2), or worse.  Use an
  *      RB-tree if that turns out to matter. */
-smartlist_t *
+static smartlist_t *
 policy_summary_create(void)
 {
   smartlist_t *summary;
@@ -959,7 +949,7 @@
  * starts at new_starts and ends at the port where the original item
  * previously ended.
  */
-policy_summary_item_t*
+static policy_summary_item_t*
 policy_summary_item_split(policy_summary_item_t* old, uint16_t new_starts)
 {
   policy_summary_item_t* new;
@@ -985,7 +975,7 @@
 /* Split an exit policy summary so that prt_min and prt_max
  * fall at exactly the start and end of an item respectively.
  */
-int
+static int
 policy_summary_split(smartlist_t *summary,
                      uint16_t prt_min, uint16_t prt_max)
 {
@@ -1015,7 +1005,7 @@
 }
 
 /** Mark port ranges as accepted if they are below the reject_count */
-void
+static void
 policy_summary_accept(smartlist_t *summary,
                       uint16_t prt_min, uint16_t prt_max)
 {
@@ -1032,7 +1022,7 @@
 
 /** Count the number of addresses in a network with prefixlen maskbits
  * against the given portrange. */
-void
+static void
 policy_summary_reject(smartlist_t *summary,
                       maskbits_t maskbits,
                       uint16_t prt_min, uint16_t prt_max)
@@ -1055,7 +1045,7 @@
  *  If it's a reject ignore it if it is about one of the private
  *  networks, else call policy_summary_reject().
  */
-void
+static void
 policy_summary_add_item(smartlist_t *summary, addr_policy_t *p)
 {
   if (p->policy_type == ADDR_POLICY_ACCEPT) {



More information about the tor-commits mailing list