From: Amos Jeffries Date: Tue, 22 Mar 2011 12:23:25 +0000 (+1300) Subject: ICC: dead code removal X-Git-Tag: take06~27^2~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1545d2d134c542a19ec4fe2a5a3381d8f12b9320;p=thirdparty%2Fsquid.git ICC: dead code removal --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 82f2c6b8df..b4488024c3 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1740,15 +1740,14 @@ httpHeaderStoreReport(StoreEntry * e) http_hdr_type httpHeaderIdByName(const char *name, size_t name_len, const HttpHeaderFieldInfo * info, int end) { - int i; - - for (i = 0; i < end; ++i) { - if (name_len >= 0 && name_len != info[i].name.size()) - continue; + if (name_len > 0) { + for (int i = 0; i < end; ++i) { + if (name_len != info[i].name.size()) + continue; - if (!strncasecmp(name, info[i].name.termedBuf(), - name_len < 0 ? info[i].name.size() + 1 : name_len)) - return info[i].id; + if (!strncasecmp(name, info[i].name.rawBuf(), name_len)) + return info[i].id; + } } return HDR_BAD_HDR; diff --git a/src/String.cc b/src/String.cc index bf4366cf65..e295d521ef 100644 --- a/src/String.cc +++ b/src/String.cc @@ -248,7 +248,8 @@ String::absorb(String &old) String String::substr(String::size_type from, String::size_type to) const { - Must(from >= 0 && from < size()); +// Must(from >= 0 && from < size()); + Must(from < size()); Must(to > 0 && to <= size()); Must(to > from); diff --git a/src/store.cc b/src/store.cc index af732464eb..a9d24db0d9 100644 --- a/src/store.cc +++ b/src/store.cc @@ -812,7 +812,6 @@ void StoreEntry::write (StoreIOBuffer writeBuffer) { assert(mem_obj != NULL); - assert(writeBuffer.length >= 0); /* This assert will change when we teach the store to update */ PROF_start(StoreEntry_write); assert(store_status == STORE_PENDING);