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

Re: [PATCH] Remove compiler warnings - take 2

From: <gstein_at_lyra.org>
Date: 2003-01-23 03:02:24 CET

On Wed, Jan 22, 2003 at 09:06:03AM -0800, Justin Erenkrantz wrote:
...
 +++ subversion/libsvn_subr/path.c (working copy)
 @@ -538,24 +538,16 @@
          return NULL;
      }
 
 - /* Now run through the possibilities. */
 + /* The only possibility for it being child here is when path1 is
 now blank,

Your mailer is wrapping patches :-( [not that it matters here, but...]

 + * and path 2 is the beginning of a directory.
 + */
 
 - if (path1[i] (! path2[i]))
 + if ((! path1[i]) path2[i] path2[i] == '/')

The middle condition is extraneous. The check against '/' is sufficient.
So... to clarify the first test, and to simplify further:

  if (path1[i] == '\0' path2[i] == '/')

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:08:18 2006

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