diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-18 21:12:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-18 21:12:45 -0400 |
commit | 78bc814c049fe67d0b521a288d3516248e110301 (patch) | |
tree | ee4527f797d9bd2b72b81703fd93419e66284b43 /src/or/cpuworker.c | |
parent | 895b6789e8b33af180a00d843eb25343bace4a4d (diff) | |
download | tor-78bc814c049fe67d0b521a288d3516248e110301.tar.gz tor-78bc814c049fe67d0b521a288d3516248e110301.zip |
scan-build: in cpuworker, initialize tv_start
scan-build doesn't realize that a request can't be timed at the end
unless it's timed at the start, and so it's not possible for us to
be subtracting start from end without start being set.
Nevertheless, let's not confuse it.
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 209274da64..6b6a68afe5 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -436,7 +436,7 @@ cpuworker_main(void *data) if (req.task == CPUWORKER_TASK_ONION) { const create_cell_t *cc = &req.create_cell; created_cell_t *cell_out = &rpl.created_cell; - struct timeval tv_start, tv_end; + struct timeval tv_start = {0,0}, tv_end; int n; rpl.timed = req.timed; rpl.started_at = req.started_at; |