From 59bc0ee8341c514fb3cea91a3c44e6c6bead3cf9 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 13 Sep 2012 22:23:35 +0200 Subject: Static code checking (Bug #614232) (bzr r11668) --- src/style.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/style.cpp') 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; } -- cgit v1.2.3