Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions iocore/eventsystem/P_IOBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,7 @@ IOBufferReader::consume(int64_t n)

TS_INLINE char &IOBufferReader::operator[](int64_t i)
{
static char _error = '\0';
IOBufferBlock *b = block.get();
IOBufferBlock *b = block.get();

i += start_offset;
while (b) {
Expand All @@ -696,12 +695,7 @@ TS_INLINE char &IOBufferReader::operator[](int64_t i)
b = b->next.get();
}

ink_assert(!"out of range");
if (unlikely(b)) {
return *b->start();
}

return _error;
ink_release_assert(!"out of range");
}

TS_INLINE void
Expand Down