summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-01 11:33:07 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-01 11:33:07 -0400
commit1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32 (patch)
tree544aeb563be67269a387a668b0c7ec22e0d4dcb1 /src/or/relay.c
parenta0ae80788cc12284cd63ac678318f95e1238b257 (diff)
downloadtor-1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32.tar.gz
tor-1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32.zip
Don't shadow parameters with local variables
This is a little error-prone when the local has a different type from the parameter, and is very error-prone with both have the same type. Let's not do this. Fixes CID #437,438,439,440,441.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index d647b18a81..df6d0a8a5f 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -2337,13 +2337,13 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max,
/* Calculate the exact time that this cell has spent in the queue. */
if (get_options()->CellStatistics && !CIRCUIT_IS_ORIGIN(circ)) {
- struct timeval now;
+ struct timeval tvnow;
uint32_t flushed;
uint32_t cell_waiting_time;
insertion_time_queue_t *it_queue = queue->insertion_times;
- tor_gettimeofday_cached(&now);
- flushed = (uint32_t)((now.tv_sec % SECONDS_IN_A_DAY) * 100L +
- (uint32_t)now.tv_usec / (uint32_t)10000L);
+ tor_gettimeofday_cached(&tvnow);
+ flushed = (uint32_t)((tvnow.tv_sec % SECONDS_IN_A_DAY) * 100L +
+ (uint32_t)tvnow.tv_usec / (uint32_t)10000L);
if (!it_queue || !it_queue->first) {
log_info(LD_GENERAL, "Cannot determine insertion time of cell. "
"Looks like the CellStatistics option was "