diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-11-22 13:03:21 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-11-22 13:03:21 +0000 |
commit | 6591ba35f6fa5dc3867c5ff27ebef523ce8729d3 (patch) | |
tree | 310e46cb2386d93c29583966728d81411f9f6a00 /src/parse/properties | |
parent | e00a1f0dffe58a36d30a93a073da31562a9ffa57 (diff) | |
download | libcss-6591ba35f6fa5dc3867c5ff27ebef523ce8729d3.tar.gz libcss-6591ba35f6fa5dc3867c5ff27ebef523ce8729d3.tar.bz2 |
Lose redundant assignments.
Drop some dead code.
Avoid a potential NULL dereference.
Add missing "break" in initial substate of block context parser
svn path=/trunk/libcss/; revision=9678
Diffstat (limited to 'src/parse/properties')
-rw-r--r-- | src/parse/properties/font.c | 2 | ||||
-rw-r--r-- | src/parse/properties/generated_list.c | 4 | ||||
-rw-r--r-- | src/parse/properties/utils.c | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/parse/properties/font.c b/src/parse/properties/font.c index 36228c2..e45f46f 100644 --- a/src/parse/properties/font.c +++ b/src/parse/properties/font.c @@ -117,8 +117,6 @@ css_error parse_font(css_language *c, if (error == CSS_OK) { consumeWhitespace(vector, ctx); - - token = parserutils_vector_peek(vector, *ctx); } else { break; } diff --git a/src/parse/properties/generated_list.c b/src/parse/properties/generated_list.c index 0eedd02..71de141 100644 --- a/src/parse/properties/generated_list.c +++ b/src/parse/properties/generated_list.c @@ -671,7 +671,7 @@ css_error parse_quotes(css_language *c, close = token->idata; - token = parserutils_vector_iterate(vector, &temp_ctx); + parserutils_vector_iterate(vector, &temp_ctx); consumeWhitespace(vector, &temp_ctx); @@ -736,7 +736,7 @@ css_error parse_quotes(css_language *c, close = token->idata; - token = parserutils_vector_iterate(vector, ctx); + parserutils_vector_iterate(vector, ctx); consumeWhitespace(vector, ctx); diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c index c7af699..8676015 100644 --- a/src/parse/properties/utils.c +++ b/src/parse/properties/utils.c @@ -48,8 +48,8 @@ css_error parse_colour_specifier(css_language *c, token->type != CSS_TOKEN_HASH && token->type != CSS_TOKEN_FUNCTION)) { if (c->sheet->quirks_allowed == false || - (token != NULL && - token->type != CSS_TOKEN_NUMBER && + token == NULL || + (token->type != CSS_TOKEN_NUMBER && token->type != CSS_TOKEN_DIMENSION)) goto invalid; } |