Author: julianfoad
Date: Mon Nov 21 09:10:37 2011
New Revision: 1204407
URL: http://svn.apache.org/viewvc?rev=1204407&view=rev
Log:
Change a switch statement to an equivalent 'if' statement to work around the
OWC compiler's current inability to handle a 64-bit switch expression, and
thus to enable Subversion to be compiled with OWC, since this is the only
place where it stumbles.
Patch by: NormW <normw{_AT_}gknw.net>
* subversion/libsvn_ra_svn/client.c
(optbool_to_tristate): Use 'if' instead of 'switch'.
Modified:
subversion/trunk/subversion/libsvn_ra_svn/client.c
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1204407&r1=1204406&r2=1204407&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Mon Nov 21 09:10:37 2011
@@ -1166,15 +1166,12 @@ static svn_error_t *ra_svn_get_dir(svn_r
static svn_tristate_t
optbool_to_tristate(apr_uint64_t v)
{
- switch (v)
- {
- case TRUE:
- return svn_tristate_true;
- case FALSE:
- return svn_tristate_false;
- default: /* Contains SVN_RA_SVN_UNSPECIFIED_NUMBER */
- return svn_tristate_unknown;
- }
+ if (v == TRUE)
+ return svn_tristate_true;
+ if (v == FALSE)
+ return svn_tristate_false;
+
+ return svn_tristate_unknown; /* Contains SVN_RA_SVN_UNSPECIFIED_NUMBER */
}
/* If REVISION is SVN_INVALID_REVNUM, no value is sent to the