diff options
Diffstat (limited to 'lib/tsan/rtl/tsan_fd.cpp')
-rw-r--r-- | lib/tsan/rtl/tsan_fd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_fd.cpp b/lib/tsan/rtl/tsan_fd.cpp index db01d8095..50a6b5691 100644 --- a/lib/tsan/rtl/tsan_fd.cpp +++ b/lib/tsan/rtl/tsan_fd.cpp @@ -86,7 +86,8 @@ static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { else user_free(thr, pc, p, false); } - return &((FdDesc*)l1)[fd % kTableSizeL2]; // NOLINT + FdDesc *fds = reinterpret_cast<FdDesc *>(l1); + return &fds[fd % kTableSizeL2]; } // pd must be already ref'ed. |