]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
More constness in dirserv.c
authorAndrea Shepard <andrea@torproject.org>
Thu, 7 Mar 2013 13:05:56 +0000 (05:05 -0800)
committerAndrea Shepard <andrea@torproject.org>
Thu, 7 Mar 2013 13:05:56 +0000 (05:05 -0800)
src/or/dirserv.c

index 1160f6baf05b7add3742ffee95379b71f5b33040..1846dc1ba2767e4201417f5799636a18af74430a 100644 (file)
@@ -90,9 +90,9 @@ static void dirserv_cache_measured_bw(const measured_bw_line_t *parsed_line,
 static void dirserv_clear_measured_bw_cache(void);
 static void dirserv_expire_measured_bw_cache(time_t now);
 static int dirserv_get_measured_bw_cache_size(void);
-static int dirserv_query_measured_bw_cache(char *node_id, long *bw_out,
+static int dirserv_query_measured_bw_cache(const char *node_id, long *bw_out,
                                            time_t *as_of_out);
-static uint32_t dirserv_get_bandwidth_for_router(routerinfo_t *ri);
+static uint32_t dirserv_get_bandwidth_for_router(const routerinfo_t *ri);
 
 /************** Measured Bandwidth parsing code ******/
 #define MAX_MEASUREMENT_AGE (3*24*60*60) /* 3 days */
@@ -2162,7 +2162,7 @@ dirserv_get_measured_bw_cache_size(void)
 /** Query the cache by identity digest, return value indicates whether
  * we found it. */
 static int
-dirserv_query_measured_bw_cache(char *node_id, long *bw_out,
+dirserv_query_measured_bw_cache(const char *node_id, long *bw_out,
                                 time_t *as_of_out)
 {
   mbw_cache_entry_t *v = NULL;
@@ -2185,7 +2185,7 @@ dirserv_query_measured_bw_cache(char *node_id, long *bw_out,
  * preferring measured to advertised values if available. */
 
 static uint32_t
-dirserv_get_bandwidth_for_router(routerinfo_t *ri)
+dirserv_get_bandwidth_for_router(const routerinfo_t *ri)
 {
   uint32_t bw = 0;
   /*