diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-08-03 21:40:52 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-08-03 21:40:52 +0000 |
commit | 2885c5457c520f6d07859582f509e72343104776 (patch) | |
tree | 759064b2547e99cbc554b1f7175bce142a1a36a7 /xsltproc | |
parent | d58accb58878f2163ab2069b605ff330614c6a26 (diff) | |
download | libxslt-2885c5457c520f6d07859582f509e72343104776.tar.gz libxslt-2885c5457c520f6d07859582f509e72343104776.tar.bz2 libxslt-2885c5457c520f6d07859582f509e72343104776.zip |
minor change, avoid wasting CPU cycles Daniel
* xsltproc/xsltproc.c: minor change, avoid wasting CPU cycles
Daniel
Diffstat (limited to 'xsltproc')
-rw-r--r-- | xsltproc/xsltproc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index ac4ead3a..28a64797 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -163,10 +163,12 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID, const char *lastsegment = URL; const char *iter = URL; - while (*iter != 0) { - if (*iter == '/') - lastsegment = iter + 1; - iter++; + if (nbpaths > 0) { + while (*iter != 0) { + if (*iter == '/') + lastsegment = iter + 1; + iter++; + } } if ((ctxt != NULL) && (ctxt->sax != NULL)) { |