summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-09-13 20:23:35 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-09-13 20:23:35 +0000
commit59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9 (patch)
tree127816a8365889286a0dd78bd2a979f41c913d5d /src
parentMake last segment before close path absolute. (diff)
downloadinkscape-59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9.tar.gz
inkscape-59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9.zip
Static code checking (Bug #614232)
(bzr r11668)
Diffstat (limited to 'src')
-rw-r--r--src/style.cpp7
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;
}