[vlc-commits] UPNP: return NULL instead of 0 in xml_getChildElementValue.

Konstantin Pavlov git at videolan.org
Thu Apr 21 11:31:44 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Thu Apr 21 11:40:25 2011 +0400| [d03d1439aed52a0d2494e0055b121d88164da8ff] | committer: Konstantin Pavlov

UPNP: return NULL instead of 0 in xml_getChildElementValue.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d03d1439aed52a0d2494e0055b121d88164da8ff
---

 modules/services_discovery/upnp.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index bea0e6b..3cf2f7b 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -154,18 +154,18 @@ static void Close( vlc_object_t *p_this )
 const char* xml_getChildElementValue( IXML_Element* p_parent,
                                       const char*   psz_tag_name_ )
 {
-    if ( !p_parent ) return 0;
-    if ( !psz_tag_name_ ) return 0;
+    if ( !p_parent ) return NULL;
+    if ( !psz_tag_name_ ) return NULL;
 
     IXML_NodeList* p_node_list = ixmlElement_getElementsByTagName( p_parent, psz_tag_name_ );
-    if ( !p_node_list ) return 0;
+    if ( !p_node_list ) return NULL;
 
     IXML_Node* p_element = ixmlNodeList_item( p_node_list, 0 );
     ixmlNodeList_free( p_node_list );
-    if ( !p_element ) return 0;
+    if ( !p_element ) return NULL;
 
     IXML_Node* p_text_node = ixmlNode_getFirstChild( p_element );
-    if ( !p_text_node ) return 0;
+    if ( !p_text_node ) return NULL;
 
     return ixmlNode_getNodeValue( p_text_node );
 }



More information about the vlc-commits mailing list