[vlc-commits] Small simplification

Rémi Denis-Courmont git at videolan.org
Wed Jan 19 23:09:57 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 19 19:39:17 2011 +0200| [7ca109664f813ed519ca16739fd297ffe3e69c93] | committer: Rémi Denis-Courmont

Small simplification

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

 modules/misc/xml/libxml.c |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index 47b1f78..60ae2f3 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -214,29 +214,21 @@ static int ReaderRead( xml_reader_t *p_reader )
 
 static int ReaderNodeType( xml_reader_t *p_reader )
 {
-    int i_ret = xmlTextReaderNodeType( (void *)p_reader->p_sys );
-
-    switch( i_ret )
+    switch( xmlTextReaderNodeType( (void *)p_reader->p_sys ) )
     {
     case XML_READER_TYPE_ELEMENT:
-        i_ret = XML_READER_STARTELEM;
-        break;
+        return XML_READER_STARTELEM;
     case XML_READER_TYPE_END_ELEMENT:
-        i_ret = XML_READER_ENDELEM;
-        break;
+        return XML_READER_ENDELEM;
     case XML_READER_TYPE_CDATA:
     case XML_READER_TYPE_TEXT:
-        i_ret = XML_READER_TEXT;
-        break;
+        return XML_READER_TEXT;
     case -1:
-        i_ret = -1;
-        break;
-    default:
-        i_ret = XML_READER_NONE;
-        break;
+        return -1;
     }
 
-    return i_ret;
+    return XML_READER_NONE;
+
 }
 
 static char *ReaderName( xml_reader_t *p_reader )



More information about the vlc-commits mailing list