From b653d000223d35f7cb58c18292dad71350414412 Mon Sep 17 00:00:00 2001 From: Nathan Garabedian Date: Wed, 26 Oct 2016 23:14:59 +0000 Subject: [PATCH] TS-5009 CID 1022011 Logically dead code removal --- iocore/eventsystem/P_IOBuffer.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h index a1952d5be53..98802df5b14 100644 --- a/iocore/eventsystem/P_IOBuffer.h +++ b/iocore/eventsystem/P_IOBuffer.h @@ -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) { @@ -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