1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-19 14:50:07 +03:00

cleanup: remove some unreachable code

This commit is contained in:
Thomas Holder 2018-11-05 14:26:26 +01:00 committed by Daniel Veillard
parent b1f87c0e43
commit a71b98ec9d

27
uri.c
View File

@ -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++;
}
/*