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

Re: svn commit: r25554 - trunk/subversion/libsvn_wc

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-06-27 16:38:37 CEST

On Wed, Jun 27, 2007 at 06:55:20AM -0700, pburba@tigris.org wrote:
> Set TRUE/FALSE *not* non-zero/zero int when testing a WC path's switch status.
>
> * subversion/libsvn_wc/util.c
> (svn_wc__path_switched): Set *switched argument to TRUE or FALSE as per the
> docstring for this function.

In general, our doc-strings should just say something like "Set
*switched to true if ...; otherwise, set *switched to false", and not
worry about whether we're using TRUE specifically.

(and we obviously shouldn't be testing again TRUE directly).

> - *switched = strcmp(parent_child_url, entry->url);
> + *switched = strcmp(parent_child_url, entry->url) == 0 ? FALSE : TRUE;

(Incidentally, I find both of those forms really hard to parse. That
might just be me, however).

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Wed Jun 27 16:38:47 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.