[libxml2] cleanup: remove some unreachable code



commit a71b98ec9dee2d44e16a74ab8472868891bbc7b4
Author: Thomas Holder <thomas holder schrodinger com>
Date:   Mon Nov 5 14:26:26 2018 +0100

    cleanup: remove some unreachable code

 uri.c | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/uri.c b/uri.c
index 4901a117..2cf8d9f1 100644
--- a/uri.c
+++ b/uri.c
@@ -2236,25 +2236,8 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
      * First we take care of the special case where either of the
      * two path components may be missing (bug 316224)
      */
-    if (bas->path == NULL) {
-       if (ref->path != NULL) {
-           uptr = (xmlChar *) ref->path;
-           if (*uptr == '/')
-               uptr++;
-           /* exception characters from xmlSaveUri */
-           val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,");
-       }
-       goto done;
-    }
     bptr = (xmlChar *)bas->path;
-    if (ref->path == NULL) {
-       for (ix = 0; bptr[ix] != 0; ix++) {
-           if (bptr[ix] == '/')
-               nbslash++;
-       }
-       uptr = NULL;
-       len = 1;        /* this is for a string terminator only */
-    } else {
+    {
         xmlChar *rptr = (xmlChar *) ref->path;
         int pos = 0;
 
@@ -2289,11 +2272,9 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
        /*
         * In base, count the number of '/' from the differing point
         */
-       if (bptr[pos] != rptr[pos]) {/* check for trivial URI == base */
-           for (; bptr[ix] != 0; ix++) {
-               if (bptr[ix] == '/')
-                   nbslash++;
-           }
+       for (; bptr[ix] != 0; ix++) {
+           if (bptr[ix] == '/')
+               nbslash++;
        }
 
        /*


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