summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ot_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ot_stats.c b/ot_stats.c
index 46fc961..3d01e10 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -111,7 +111,7 @@ static int stats_shift_down_network_count( stats_network_node **node, int depth,
111 depth += STATS_NETWORK_NODE_BITWIDTH; 111 depth += STATS_NETWORK_NODE_BITWIDTH;
112 if( depth == STATS_NETWORK_NODE_MAXDEPTH ) { 112 if( depth == STATS_NETWORK_NODE_MAXDEPTH ) {
113 for( i=0; i<STATS_NETWORK_NODE_COUNT; ++i ) 113 for( i=0; i<STATS_NETWORK_NODE_COUNT; ++i )
114 rest += ((*node)->counters[i]>>=shift); 114 rest += (*node)->counters[i] >>= shift;
115 return rest; 115 return rest;
116 } 116 }
117 117
@@ -276,7 +276,7 @@ bailout_unlock:
276bailout_error: 276bailout_error:
277 r = reply; 277 r = reply;
278success: 278success:
279 stats_shift_down_network_count( &slash24s_network_counters_root, 0, STATS_NETWORK_NODE_MAXDEPTH*STATS_NETWORK_NODE_BITWIDTH ); 279 stats_shift_down_network_count( &slash24s_network_counters_root, 0, sizeof(int)*8-1 );
280 if( slash24s_network_counters_root ) 280 if( slash24s_network_counters_root )
281 free( slash24s_network_counters_root ); 281 free( slash24s_network_counters_root );
282 return r-reply; 282 return r-reply;