aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_controller_events.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2013-09-12 10:51:55 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2013-09-12 10:51:55 +0200
commitb43a37bc5b6813224b9ac727e98a96d6ce2c5f2b (patch)
treea3a58d9ed3639b72f72f37bc83c4b2c679fb657b /src/test/test_controller_events.c
parentd5f0d792dd2e4e5f0314ecd15efe42d1c5e64f25 (diff)
downloadtor-b43a37bc5b6813224b9ac727e98a96d6ce2c5f2b.tar.gz
tor-b43a37bc5b6813224b9ac727e98a96d6ce2c5f2b.zip
Pass const uint64_t pointers, document array length.
Suggested by nickm.
Diffstat (limited to 'src/test/test_controller_events.c')
-rw-r--r--src/test/test_controller_events.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c
index a0e2c6e4bb..0b5434cd38 100644
--- a/src/test/test_controller_events.c
+++ b/src/test/test_controller_events.c
@@ -158,28 +158,32 @@ test_cntev_append_cell_stats(void *arg)
(CELL_COMMAND_MAX_ + 1) * sizeof(uint64_t));
/* All array entries empty. */
- append_cell_stats_by_command(event_parts, key, include_if_non_zero,
- number_to_include);
+ append_cell_stats_by_command(event_parts, key,
+ (const uint64_t *) include_if_non_zero,
+ (const uint64_t *) number_to_include);
tt_int_op(0, ==, smartlist_len(event_parts));
/* There's a RELAY cell to include, but the corresponding field in
* include_if_non_zero is still zero. */
number_to_include[CELL_RELAY] = 1;
- append_cell_stats_by_command(event_parts, key, include_if_non_zero,
- number_to_include);
+ append_cell_stats_by_command(event_parts, key,
+ (const uint64_t *) include_if_non_zero,
+ (const uint64_t *) number_to_include);
tt_int_op(0, ==, smartlist_len(event_parts));
/* Now include single RELAY cell. */
include_if_non_zero[CELL_RELAY] = 2;
- append_cell_stats_by_command(event_parts, key, include_if_non_zero,
- number_to_include);
+ append_cell_stats_by_command(event_parts, key,
+ (const uint64_t *) include_if_non_zero,
+ (const uint64_t *) number_to_include);
tt_str_op("Z=relay:1", ==, smartlist_pop_last(event_parts));
/* Add four CREATE cells. */
include_if_non_zero[CELL_CREATE] = 3;
number_to_include[CELL_CREATE] = 4;
- append_cell_stats_by_command(event_parts, key, include_if_non_zero,
- number_to_include);
+ append_cell_stats_by_command(event_parts, key,
+ (const uint64_t *) include_if_non_zero,
+ (const uint64_t *) number_to_include);
tt_str_op("Z=create:4,relay:1", ==, smartlist_pop_last(event_parts));
done: