Commit c3d483b7 authored by Oguz Ulgen's avatar Oguz Ulgen Committed by Facebook GitHub Bot

Dont use sizeof on a variable size array

Reviewed By: yfeldblum

Differential Revision: D34154912

fbshipit-source-id: cb3528c4ab853c2b2dc82871f4ac1307d614f388
parent 825f025d
......@@ -179,7 +179,7 @@ class LockFreeRingBuffer {
/// dumped memory regions.
std::pair<void const*, size_t> internalBufferLocation() const {
return std::make_pair(
static_cast<void const*>(slots_.get()), sizeof(Slot[capacity_]));
static_cast<void const*>(slots_.get()), capacity_ * sizeof(Slot));
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment