diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 10:09:29 +0000 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 10:11:08 +0000 |
commit | 275ae825d98c90803f7d3db26abcb25c9372b023 (patch) | |
tree | cb797a3a3315334c588880b6e5f6105a4a4eb5b0 | |
parent | 622b5b525a488b02353b8998267ff08bee6a605b (diff) | |
download | libcss-275ae825d98c90803f7d3db26abcb25c9372b023.tar.gz libcss-275ae825d98c90803f7d3db26abcb25c9372b023.tar.bz2 |
Parse: Add missing error checks for outline shorthand.
Fixes scan-build: Value stored to 'error' is never read.
Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org>
-rw-r--r-- | src/parse/properties/outline.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/parse/properties/outline.c b/src/parse/properties/outline.c index d9d9ec2..4d4fbf0 100644 --- a/src/parse/properties/outline.c +++ b/src/parse/properties/outline.c @@ -122,20 +122,29 @@ css_error css__parse_outline(css_language *c, /* defaults */ if (color) { error = css__stylesheet_style_appendOPV(color_style, - CSS_PROP_OUTLINE_COLOR, + CSS_PROP_OUTLINE_COLOR, 0, OUTLINE_COLOR_INVERT); + if (error != CSS_OK) { + goto css__parse_outline_cleanup; + } } if (style) { error = css__stylesheet_style_appendOPV(style_style, - CSS_PROP_OUTLINE_STYLE, + CSS_PROP_OUTLINE_STYLE, 0, OUTLINE_STYLE_NONE); + if (error != CSS_OK) { + goto css__parse_outline_cleanup; + } } if (width) { error = css__stylesheet_style_appendOPV(width_style, - CSS_PROP_OUTLINE_WIDTH, + CSS_PROP_OUTLINE_WIDTH, 0, OUTLINE_WIDTH_MEDIUM); + if (error != CSS_OK) { + goto css__parse_outline_cleanup; + } } |