[vlc-commits] xml: use defined error value

Francois Cartegnie git at videolan.org
Tue Jan 3 16:59:48 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan  3 11:42:22 2017 +0100| [172ed925ff4f48bdc2d6015246793a2a9846cc00] | committer: Francois Cartegnie

xml: use defined error value

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

 modules/misc/xml/libxml.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index 13415b2..059c269 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -223,7 +223,7 @@ skip:
         case 0: /* EOF */
             return XML_READER_NONE;
         case -1: /* error */
-            return -1;
+            return XML_READER_ERROR;
     }
 
     switch( xmlTextReaderNodeType( p_sys->xml ) )
@@ -245,19 +245,19 @@ skip:
             break;
 
         case -1:
-            return -1;
+            return XML_READER_ERROR;
 
         default:
             goto skip;
     }
 
     if( unlikely(node == NULL) )
-        return -1;
+        return XML_READER_ERROR;
 
     p_sys->node = strdup( (const char *)node );
     if( pval != NULL )
         *pval = p_sys->node;
-    return likely(p_sys->node != NULL) ? ret : -1;
+    return likely(p_sys->node != NULL) ? ret : XML_READER_ERROR;
 }
 
 #if 0



More information about the vlc-commits mailing list