[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

skip_uri_scheme question

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-10-02 16:00:41 CEST

In this function:

static const char *
skip_uri_scheme(const char *path)
{
   apr_size_t j;

   for (j = 0; path[j]; ++j)
     if (path[j] == ':' || path[j] == '/')
        break;

   if (j > 0 && path[j] == ':' && path[j+1] == '/' && path[j+2] == '/')
     return path + j + 3;

Why do we check for a ':' and a '/' in the for loop to break out early but only
return success if that first character is a ':' in the second if?

Thanks,
Blair

-- 
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 2 16:01:01 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.