From 5f0ddb2d2068a4388a7df12cd0e11f628b91e4c0 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 28 Oct 2018 00:13:29 +0300 Subject: tdf#120703 PVS: V547 Expression is always true/false Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc Reviewed-on: https://gerrit.libreoffice.org/62450 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- unoxml/source/dom/attr.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'unoxml') diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index 22f214dbf384..4ff411d3f62c 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -156,11 +156,8 @@ namespace DOM if (nullptr == m_aAttrPtr->children) { return OUString(); } - char const*const pContent((m_aAttrPtr->children) - ? reinterpret_cast(m_aAttrPtr->children->content) - : ""); - OUString const ret(pContent, strlen(pContent), RTL_TEXTENCODING_UTF8); - return ret; + char const*const pContent(reinterpret_cast(m_aAttrPtr->children->content)); + return OUString(pContent, strlen(pContent), RTL_TEXTENCODING_UTF8); } /** -- cgit v1.2.3