Commit f360b5c1 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

src: Prefer std::equal

parent 07fdaaba
......@@ -765,7 +765,7 @@ bool select_h2(const unsigned char **out, unsigned char *outlen,
const unsigned char *in, unsigned int inlen, const char *key,
unsigned int keylen) {
for (auto p = in, end = in + inlen; p + keylen <= end; p += *p + 1) {
if (memcmp(key, p, keylen) == 0) {
if (std::equal(key, key + keylen, p)) {
*out = p + 1;
*outlen = *p;
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment