[sanitize] Simplify ChainRule::sanitize again

check_struct does the same now.
This commit is contained in:
Behdad Esfahbod committed 2023-07-08 12:53:23 -06:00
1 parent 253ec08b3d
commit 4ecc62c28d
1 file changed
+3 -3
+3 -3
View File
@@ -3087,11 +3087,11 @@ struct ChainRule
{
TRACE_SANITIZE (this);
/* Hyper-optimized sanitized because this is really hot. */
if (!c->check_point (&StructAfter<char> (backtrack.len))) return_trace (false);
if (!backtrack.len.sanitize (c)) return_trace (false);
const auto &input = StructAfter<decltype (inputX)> (backtrack);
if (!c->check_point (&StructAfter<char> (input.lenP1))) return_trace (false);
if (!input.lenP1.sanitize (c)) return_trace (false);
const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
if (!c->check_point (&StructAfter<char> (lookahead.len))) return_trace (false);
if (!lookahead.len.sanitize (c)) return_trace (false);
const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
return_trace (lookup.sanitize (c));
}