summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2013-10-28 10:48:18 +0100
committerKarsten Loesing <karsten.loesing@gmx.net>2013-10-28 10:48:18 +0100
commite46de82c97e694d3bfa399af48b9de9365e264bd (patch)
tree5c2b79c90ac119f7e09fe5edd6a34ce8bac41971 /src/or/control.c
parentb43a37bc5b6813224b9ac727e98a96d6ce2c5f2b (diff)
downloadtor-e46de82c97e694d3bfa399af48b9de9365e264bd.tar.gz
tor-e46de82c97e694d3bfa399af48b9de9365e264bd.zip
squash! Pass const uint64_t pointers, document array length.
Don't cast uint64_t * to const uint64_t * explicitly. The cast is always safe, so C does it for us. Doing the cast explitictly can hide bugs if the input is secretly the wrong type. Suggested by Nick.
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 73769733cb..9e026b391c 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -4093,14 +4093,14 @@ format_cell_stats(char **event_string, circuit_t *circ,
smartlist_add_asprintf(event_parts, "InboundConn="U64_FORMAT,
U64_PRINTF_ARG(or_circ->p_chan->global_identifier));
append_cell_stats_by_command(event_parts, "InboundAdded",
- (const uint64_t *) cell_stats->added_cells_appward,
- (const uint64_t *) cell_stats->added_cells_appward);
+ cell_stats->added_cells_appward,
+ cell_stats->added_cells_appward);
append_cell_stats_by_command(event_parts, "InboundRemoved",
- (const uint64_t *) cell_stats->removed_cells_appward,
- (const uint64_t *) cell_stats->removed_cells_appward);
+ cell_stats->removed_cells_appward,
+ cell_stats->removed_cells_appward);
append_cell_stats_by_command(event_parts, "InboundTime",
- (const uint64_t *) cell_stats->removed_cells_appward,
- (const uint64_t *) cell_stats->total_time_appward);
+ cell_stats->removed_cells_appward,
+ cell_stats->total_time_appward);
}
if (circ->n_chan) {
smartlist_add_asprintf(event_parts, "OutboundQueue=%lu",
@@ -4108,14 +4108,14 @@ format_cell_stats(char **event_string, circuit_t *circ,
smartlist_add_asprintf(event_parts, "OutboundConn="U64_FORMAT,
U64_PRINTF_ARG(circ->n_chan->global_identifier));
append_cell_stats_by_command(event_parts, "OutboundAdded",
- (const uint64_t *) cell_stats->added_cells_exitward,
- (const uint64_t *) cell_stats->added_cells_exitward);
+ cell_stats->added_cells_exitward,
+ cell_stats->added_cells_exitward);
append_cell_stats_by_command(event_parts, "OutboundRemoved",
- (const uint64_t *) cell_stats->removed_cells_exitward,
- (const uint64_t *) cell_stats->removed_cells_exitward);
+ cell_stats->removed_cells_exitward,
+ cell_stats->removed_cells_exitward);
append_cell_stats_by_command(event_parts, "OutboundTime",
- (const uint64_t *) cell_stats->removed_cells_exitward,
- (const uint64_t *) cell_stats->total_time_exitward);
+ cell_stats->removed_cells_exitward,
+ cell_stats->total_time_exitward);
}
*event_string = smartlist_join_strings(event_parts, " ", 0, NULL);
SMARTLIST_FOREACH(event_parts, char *, cp, tor_free(cp));