[rygel/wip/ruih] ruih: Remove unreachable code



commit e0129ebd75441aea765e8d53d1af90f6562b5015
Author: Jens Georg <mail jensge org>
Date:   Sun Oct 19 15:21:46 2014 +0200

    ruih: Remove unreachable code
    
    IconElem is created while iterating a list and icon_node->name is checked
    before creating the element. It's impossible to pass a null-node here.
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/librygel-ruih/rygel-ruih-icon-elem.vala     |    3 ---
 src/librygel-ruih/rygel-ruih-protocol-elem.vala |    4 ----
 src/librygel-ruih/rygel-ruih-ui-elem.vala       |    5 -----
 3 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/src/librygel-ruih/rygel-ruih-icon-elem.vala b/src/librygel-ruih/rygel-ruih-icon-elem.vala
index 32c93c0..19587bf 100644
--- a/src/librygel-ruih/rygel-ruih-icon-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-icon-elem.vala
@@ -44,9 +44,6 @@ protected class IconElem : UIListing {
     private string url = null;
 
     public IconElem (Xml.Node* node) throws Rygel.RuihServiceError {
-        if (node == null) {
-            throw new Rygel.RuihServiceError.OPERATION_REJECTED ("Unable to parse Icon data - null");
-        }
         // Invalid XML Handling?
         foreach (var child_node in new Rygel.XMLUtils.ChildIterator (node)) {
             if (child_node->type == Xml.ElementType.TEXT_NODE) {
diff --git a/src/librygel-ruih/rygel-ruih-protocol-elem.vala b/src/librygel-ruih/rygel-ruih-protocol-elem.vala
index 346fb59..d336540 100644
--- a/src/librygel-ruih/rygel-ruih-protocol-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-protocol-elem.vala
@@ -37,10 +37,6 @@ protected class ProtocolElem : UIListing {
     public ProtocolElem (Xml.Node* node) throws Rygel.RuihServiceError {
         this.uris = new ArrayList<string> ();
 
-        if (node == null) {
-            throw new Rygel.RuihServiceError.OPERATION_REJECTED
-                ("Unable to parse Protocol data - null");
-        }
         for (Xml.Attr* prop = node->properties; prop != null;
             prop = prop->next) {
             string attr_name = prop->name;
diff --git a/src/librygel-ruih/rygel-ruih-ui-elem.vala b/src/librygel-ruih/rygel-ruih-ui-elem.vala
index e9b59f8..9d576ba 100644
--- a/src/librygel-ruih/rygel-ruih-ui-elem.vala
+++ b/src/librygel-ruih/rygel-ruih-ui-elem.vala
@@ -41,11 +41,6 @@ protected class UIElem : UIListing
     private ArrayList<ProtocolElem> protocols;
 
     public UIElem (Xml.Node* node) throws Rygel.RuihServiceError {
-        if (node == null) {
-            throw new Rygel.RuihServiceError.OPERATION_REJECTED
-                ("Unable to parse UI data - null");
-        }
-
         this.icons = new ArrayList<IconElem> ();
         this.protocols = new ArrayList<ProtocolElem> ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]