From: Jaroslav Kysela Date: Fri, 15 Apr 2016 12:18:48 +0000 (+0200) Subject: prop: tiny optimization for string handling X-Git-Tag: v4.2.1~648 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdde12b1ae1e4e0de752442ddee8b3e082b56415;p=thirdparty%2Ftvheadend.git prop: tiny optimization for string handling --- diff --git a/src/prop.c b/src/prop.c index 484a753dd..7bf6d9372 100644 --- a/src/prop.c +++ b/src/prop.c @@ -317,13 +317,9 @@ prop_read_value htsmsg_add_s64(m, name, atomic_get_s64((int64_t *)val)); break; case PT_STR: - if (optmask & PO_LOCALE) { - if ((s = *(const char **)val)) - htsmsg_add_str(m, name, lang ? tvh_gettext_lang(lang, s) : s); - } else { - if ((s = *(const char **)val)) - htsmsg_add_str(m, name, s); - } + if ((s = *(const char **)val)) + htsmsg_add_str(m, name, (optmask & PO_LOCALE) != 0 && lang ? + tvh_gettext_lang(lang, s) : s); break; case PT_DBL: htsmsg_add_dbl(m, name, *(double*)val);