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

Re: svn commit: r1476563 - /subversion/trunk/subversion/svnserve/serve.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sat, 27 Apr 2013 14:23:56 +0000

Some of these tests are now more robust but completely wrong as the value had 3 defined values where one now has exactly the opposite result and usually breaks compatibility when using older clients...


The B type has an explicit undefined value for when the value is not sent over the connection...

(b with 2 values expect a svn_boolean_t.)


This error (accidentally added by Julian) was just fixed a few changes to this file earlier.


Bert



Sent from Windows Mail



From: brane_at_apache.org
Sent: ‎Saturday‎, ‎April‎ ‎27‎, ‎2013 ‎2‎:‎28‎ ‎PM
To: commits_at_subversion.apache.org

Author: brane
Date: Sat Apr 27 12:28:44 2013
New Revision: 1476563

URL: http://svn.apache.org/r1476563
Log:
* subversion/svnserve/serve.c (update): Silence a warning about conversion
   of apr_uint64_t to svn_boolean_t by explicitly making the argument to
   svn_log__update a boolean expression.
  (update, switch_cmd): Incidentally, replace the cases where we had
   checks like this: "variable == TRUE" to "variable != FALSE" instead,
   since the latter is more robust given C's truth-value rules.

Modified:
    subversion/trunk/subversion/svnserve/serve.c

Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1476563&r1=1476562&r2=1476563&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Sat Apr 27 12:28:44 2013
@@ -1843,8 +1843,8 @@ static svn_error_t *update(svn_ra_svn_co
   SVN_ERR(accept_report(&is_checkout, NULL,
                         conn, pool, b, rev, target, NULL, TRUE,
                         depth,
- (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
- (ignore_ancestry == TRUE) /* ignore_ancestry */));
+ (send_copyfrom_args != FALSE), /* send_copyfrom_args */
+ (ignore_ancestry != FALSE))); /* ignore_ancestry */
   if (is_checkout)
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
@@ -1855,7 +1855,8 @@ static svn_error_t *update(svn_ra_svn_co
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
                           svn_log__update(full_path, rev, depth,
- send_copyfrom_args, pool)));
+ (send_copyfrom_args != FALSE),
+ pool)));
     }
 
   return SVN_NO_ERROR;
@@ -1905,7 +1906,7 @@ static svn_error_t *switch_cmd(svn_ra_sv
   return accept_report(NULL, NULL,
                        conn, pool, b, rev, target, switch_path, TRUE,
                        depth,
- (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
+ (send_copyfrom_args != FALSE) /* send_copyfrom_args */,
                        (ignore_ancestry != FALSE) /* ignore_ancestry */);
 }
Received on 2013-04-27 16:34:29 CEST

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.