From 85328f879f1c0e551e96c4f3689e3e5f04f9a0cb Mon Sep 17 00:00:00 2001 From: Nathan Garabedian Date: Fri, 24 Jun 2016 15:13:46 -0700 Subject: [PATCH] TS-4581 CID 1356973 dead code in proxy/hdrs/HTTP.cc --- proxy/hdrs/HTTP.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc index 34bd9791be3..7efa9e70234 100644 --- a/proxy/hdrs/HTTP.cc +++ b/proxy/hdrs/HTTP.cc @@ -1083,13 +1083,14 @@ http_parser_parse_req(HTTPParser *parser, HdrHeap *heap, HTTPHdrImpl *hh, const return PARSE_RESULT_ERROR; } + // checking these with an if statement makes coverity flag as dead code because + // url_start and url_end logically cannot be 0 at this time + ink_assert(url_start); + ink_assert(url_end); + int method_wks_idx = hdrtoken_tokenize(method_start, (int)(method_end - method_start)); http_hdr_method_set(heap, hh, method_start, method_wks_idx, (int)(method_end - method_start), must_copy_strings); - if (!url_start || !url_end) { - return PARSE_RESULT_ERROR; - } - ink_assert(hh->u.req.m_url_impl != NULL); url = hh->u.req.m_url_impl;