summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-10-02 21:15:14 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-10-07 14:50:14 +0200
commit67177586d362a123f65d8725a2369f7cf85da66b (patch)
tree8026de5c0ae4a70f0d6d494329999ed593b5a027
parent12124d2d445878b785160e01ae931973eb1ab4d9 (diff)
Fix potentially unininitialized pointer write.
-rw-r--r--core/os/rw_lock.h4
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() {