diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-10-02 21:15:14 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-10-07 14:50:14 +0200 |
commit | 67177586d362a123f65d8725a2369f7cf85da66b (patch) | |
tree | 8026de5c0ae4a70f0d6d494329999ed593b5a027 | |
parent | 12124d2d445878b785160e01ae931973eb1ab4d9 (diff) |
Fix potentially unininitialized pointer write.
-rw-r--r-- | core/os/rw_lock.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h index 8d1029723b..4333d9a016 100644 --- a/core/os/rw_lock.h +++ b/core/os/rw_lock.h @@ -57,9 +57,7 @@ class RWLockRead { public: RWLockRead(const RWLock *p_lock) { - if (p_lock) { - lock = const_cast<RWLock *>(p_lock); - } + lock = const_cast<RWLock *>(p_lock); if (lock) lock->read_lock(); } ~RWLockRead() { |