[libxml++] Element: Remove redundant null check
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++] Element: Remove redundant null check
- Date: Thu, 5 Nov 2015 09:24:37 +0000 (UTC)
commit 8f81e383bd7d7cbe3f8318bf2a65f05ce5f4b91e
Author: Renu Tyagi <renu tyagi samsung com>
Date: Thu Nov 5 10:22:29 2015 +0100
Element: Remove redundant null check
Bug #757515
libxml++/nodes/element.cc | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libxml++/nodes/element.cc b/libxml++/nodes/element.cc
index 3cc3697..c03dee6 100644
--- a/libxml++/nodes/element.cc
+++ b/libxml++/nodes/element.cc
@@ -384,12 +384,9 @@ Glib::ustring Element::get_namespace_uri_for_prefix(const Glib::ustring& ns_pref
//Find the namespace:
const auto ns = xmlSearchNs( cobj()->doc, const_cast<xmlNode*>(cobj()), (xmlChar*)ns_prefix.c_str() );
- if(ns)
- {
- //Get the namespace URI associated with this prefix:
- if(ns && ns->href)
- result = (const char*)ns->href;
- }
+ //Get the namespace URI associated with this prefix:
+ if (ns && ns->href)
+ result = (const char*)ns->href;
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]