summaryrefslogtreecommitdiff
path: root/src/librygel-ruih
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2014-10-19 15:21:46 +0200
committerJens Georg <mail@jensge.org>2014-11-08 13:20:55 +0100
commitb62f4bd4701151e7b2a380e0769f8019a5d54ba7 (patch)
treed35d057267fdb62fef8bfdc2a936c944cec3099a /src/librygel-ruih
parentfec47d8adb7d48282efbc26c5a8c741b13e3a945 (diff)
downloadrygel-b62f4bd4701151e7b2a380e0769f8019a5d54ba7.tar.gz
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>
Diffstat (limited to 'src/librygel-ruih')
-rw-r--r--src/librygel-ruih/rygel-ruih-icon-elem.vala3
-rw-r--r--src/librygel-ruih/rygel-ruih-protocol-elem.vala4
-rw-r--r--src/librygel-ruih/rygel-ruih-ui-elem.vala5
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 32c93c03..19587bfa 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 346fb596..d336540f 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 e9b59f82..9d576bae 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> ();