mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Fix coverity cid 1405509
Locking in the init function is not necessary, but coverity gets confused about it. So let's trick it.
This commit is contained in:
parent
ee478bdf38
commit
71c8974af0
1 changed files with 1 additions and 1 deletions
|
@ -362,8 +362,8 @@ alert_sockets_close(alert_sockets_t *socks)
|
||||||
void
|
void
|
||||||
atomic_counter_init(atomic_counter_t *counter)
|
atomic_counter_init(atomic_counter_t *counter)
|
||||||
{
|
{
|
||||||
|
memset(counter, 0, sizeof(*counter));
|
||||||
tor_mutex_init_nonrecursive(&counter->mutex);
|
tor_mutex_init_nonrecursive(&counter->mutex);
|
||||||
counter->val = 0;
|
|
||||||
}
|
}
|
||||||
/** Clean up all resources held by an atomic counter. */
|
/** Clean up all resources held by an atomic counter. */
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Reference in a new issue