mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-06 18:18:52 +08:00
nghttpx: Fix compile error with gcc
This commit is contained in:
@@ -1670,7 +1670,7 @@ bool contains_trailers(const StringRef &s) {
|
|||||||
|
|
||||||
for (auto p = std::begin(s), end = std::end(s);; ++p) {
|
for (auto p = std::begin(s), end = std::end(s);; ++p) {
|
||||||
p = std::find_if(p, end, [](char c) { return c != ' ' && c != '\t'; });
|
p = std::find_if(p, end, [](char c) { return c != ' ' && c != '\t'; });
|
||||||
if (p == end || end - p < trailers.size()) {
|
if (p == end || static_cast<size_t>(end - p) < trailers.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (util::strieq(trailers, StringRef{p, p + trailers.size()})) {
|
if (util::strieq(trailers, StringRef{p, p + trailers.size()})) {
|
||||||
|
|||||||
Reference in New Issue
Block a user