summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorMichael Drake <Michael Drake tlsa@netsurf-browser.org>2020-02-24 10:09:29 +0000
committerMichael Drake <Michael Drake tlsa@netsurf-browser.org>2020-02-24 10:11:08 +0000
commit275ae825d98c90803f7d3db26abcb25c9372b023 (patch)
treecb797a3a3315334c588880b6e5f6105a4a4eb5b0 /src/parse
parent622b5b525a488b02353b8998267ff08bee6a605b (diff)
downloadlibcss-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>
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties/outline.c15
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;
+ }
}