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

RE: svn commit: r36467 - trunk/subversion/libsvn_wc

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Tue, 10 Mar 2009 21:35:50 +0100

> -----Original Message-----
> From: Hyrum K. Wright [mailto:hyrum_at_hyrumwright.org]
> Sent: Tuesday, March 10, 2009 9:21 PM
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r36467 - trunk/subversion/libsvn_wc
>
> Author: hwright
> Date: Tue Mar 10 13:21:27 2009
> New Revision: 36467
>
> Log:
> Unfortunately, C doesn't have a logical XOR, but we can do better than
> !AB + A!B.
>
> * subversion/libsvn_wc/status.c
> (assemble_status): More simply simulate an exclusive OR condition.
>
> Modified:
> trunk/subversion/libsvn_wc/status.c
>
> Modified: trunk/subversion/libsvn_wc/status.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/status.c?pa
> threv=36467&r1=36466&r2=36467
> =======================================================================
> =======
> --- trunk/subversion/libsvn_wc/status.c Tue Mar 10 12:23:40 2009
> (r36466)
> +++ trunk/subversion/libsvn_wc/status.c Tue Mar 10 13:21:27 2009
> (r36467)
> @@ -502,9 +502,7 @@ assemble_status(svn_wc_status2_t **statu
> else if (path_kind != entry->kind)
> final_text_status = svn_wc_status_obstructed;
> #ifdef HAVE_SYMLINK
> - else if (((! wc_special) && (path_special))
> - || (wc_special && (! path_special))
> - )
> + else if ( wc_special != path_special)

Are you sure the true values are always 1 (=TRUE) here?

In that case you can just use the bitwise xor operator.

If not you should use something like !wc_special != !path_special.
(Uglier than the original :))

        Bert

> final_text_status = svn_wc_status_obstructed;
> #endif /* HAVE_SYMLINK */
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageI
> d=1304644

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1304677
Received on 2009-03-10 21:36:12 CET

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.