diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2017-04-26 08:48:24 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2017-04-26 08:48:24 +0200 |
commit | 71c8974af0570f3a2fe1ea5ca77e3a61873558bd (patch) | |
tree | a5f6642d5f03ff91a0df844cdd1456226cc206a8 /src/common/compat_threads.c | |
parent | ee478bdf385b052783c2edfb1b21dc500cf0d9d5 (diff) | |
download | tor-71c8974af0570f3a2fe1ea5ca77e3a61873558bd.tar.gz tor-71c8974af0570f3a2fe1ea5ca77e3a61873558bd.zip |
Fix coverity cid 1405509
Locking in the init function is not necessary, but coverity gets
confused about it. So let's trick it.
Diffstat (limited to 'src/common/compat_threads.c')
-rw-r--r-- | src/common/compat_threads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat_threads.c b/src/common/compat_threads.c index d3f64f2bad..c593e9af8d 100644 --- a/src/common/compat_threads.c +++ b/src/common/compat_threads.c @@ -362,8 +362,8 @@ alert_sockets_close(alert_sockets_t *socks) void atomic_counter_init(atomic_counter_t *counter) { + memset(counter, 0, sizeof(*counter)); tor_mutex_init_nonrecursive(&counter->mutex); - counter->val = 0; } /** Clean up all resources held by an atomic counter. */ void |