Move length calculation outside loop
svn path=/trunk/netsurf/; revision=12781
This commit is contained in:
parent
8f09c239af
commit
46339a296b
|
@ -186,12 +186,13 @@ static nserror mimesniff__match_unknown_ws(const uint8_t *data, size_t len,
|
|||
break;
|
||||
|
||||
data++;
|
||||
len--;
|
||||
}
|
||||
|
||||
if (data == end)
|
||||
return NSERROR_NOT_FOUND;
|
||||
|
||||
len = end - data;
|
||||
|
||||
for (it = ws_exact_match_types; it->sig != NULL; it++) {
|
||||
if (it->len <= len && memcmp(data, it->sig, it->len) == 0) {
|
||||
*effective_type = lwc_string_ref(*it->type);
|
||||
|
|
Loading…
Reference in New Issue