diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-11-07 17:14:02 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-11-07 17:14:02 +0000 |
commit | 1257828f0d7b7d7a39ace90de3d656cbb4b99db5 (patch) | |
tree | babc5b265cfad790b7c3cac0df460ccdbbbd6e47 | |
parent | fe2f0b4b8fd7fa1d44ca3652b910490a501444bb (diff) | |
download | libcss-1257828f0d7b7d7a39ace90de3d656cbb4b99db5.tar.gz libcss-1257828f0d7b7d7a39ace90de3d656cbb4b99db5.tar.bz2 |
Simplify cache loop criterion.
svn path=/trunk/libcss/; revision=13134
-rw-r--r-- | src/select/select.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/select/select.c b/src/select/select.c index 75f920a..7baac03 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -1347,10 +1347,11 @@ css_error match_universal_combinator(css_select_ctx *ctx, css_combinator type, (next_detail->type == CSS_SELECTOR_CLASS || next_detail->type == CSS_SELECTOR_ID)) { reject_item *reject = state->next_reject + 1; + reject_item *last = state->reject_cache + + N_ELEMENTS(state->reject_cache) - 1; bool match = false; - while (reject < state->reject_cache + - N_ELEMENTS(state->reject_cache)) { + while (reject <= last) { /* Perform pessimistic matching (may hurt quirks) */ if (reject->type == next_detail->type && lwc_string_isequal(reject->value, |