diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 10:07:51 +0000 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 10:11:08 +0000 |
commit | 622b5b525a488b02353b8998267ff08bee6a605b (patch) | |
tree | fedab42598420a0fa15d80711a8ee1e400c2fc19 /src/parse/properties/list_style.c | |
parent | e253f49b415215906d40a4a7124e08788cc46c44 (diff) | |
download | libcss-622b5b525a488b02353b8998267ff08bee6a605b.tar.gz libcss-622b5b525a488b02353b8998267ff08bee6a605b.tar.bz2 |
Parse: Add missing error checks for list-style 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/properties/list_style.c')
-rw-r--r-- | src/parse/properties/list_style.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/parse/properties/list_style.c b/src/parse/properties/list_style.c index f12fa2e..b2c8de3 100644 --- a/src/parse/properties/list_style.c +++ b/src/parse/properties/list_style.c @@ -122,20 +122,29 @@ css_error css__parse_list_style(css_language *c, /* defaults */ if (image) { error = css__stylesheet_style_appendOPV(image_style, - CSS_PROP_LIST_STYLE_IMAGE, + CSS_PROP_LIST_STYLE_IMAGE, 0, LIST_STYLE_IMAGE_NONE); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } if (position) { error = css__stylesheet_style_appendOPV(position_style, - CSS_PROP_LIST_STYLE_POSITION, + CSS_PROP_LIST_STYLE_POSITION, 0, LIST_STYLE_POSITION_OUTSIDE); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } if (type) { error = css__stylesheet_style_appendOPV(type_style, - CSS_PROP_LIST_STYLE_TYPE, + CSS_PROP_LIST_STYLE_TYPE, 0, LIST_STYLE_TYPE_DISC); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } |