diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-09-13 20:23:35 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-09-13 20:23:35 +0000 |
| commit | 59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9 (patch) | |
| tree | 127816a8365889286a0dd78bd2a979f41c913d5d /src/style.cpp | |
| parent | Make last segment before close path absolute. (diff) | |
| download | inkscape-59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9.tar.gz inkscape-59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9.zip | |
Static code checking (Bug #614232)
(bzr r11668)
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/style.cpp b/src/style.cpp index ec03dcc7e..2facc86d8 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -3881,22 +3881,23 @@ static gint sp_style_write_istring(gchar *p, gint const len, gchar const *const key, SPIString const *const val, SPIString const *const base, guint const flags) { + gint res = 0; if ((flags & SP_STYLE_FLAG_ALWAYS) || ((flags & SP_STYLE_FLAG_IFSET) && val->set) || ((flags & SP_STYLE_FLAG_IFDIFF) && val->set && (!base->set || strcmp(val->value, base->value)))) { if (val->inherit) { - return g_snprintf(p, len, "%s:inherit;", key); + res = g_snprintf(p, len, "%s:inherit;", key); } else { gchar *val_quoted = css2_escape_quote(val->value); if (val_quoted) { - return g_snprintf(p, len, "%s:%s;", key, val_quoted); + res = g_snprintf(p, len, "%s:%s;", key, val_quoted); g_free (val_quoted); } } } - return 0; + return res; } |
