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

Re: boolean issue with serf

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: Thu, 16 Apr 2009 21:48:33 +0200

On 04/16/2009 09:39 PM, Stefan Küng wrote:
> On Thu, Apr 16, 2009 at 21:30, Stefan Küng<tortoisesvn_at_gmail.com> wrote:
..
>
> A quick search through the files revealed:
>
> libsvn_ra_serf\locks.c, line 720 (1.6.x branch), function svn_ra_serf__unlock():
> if (force == TRUE&& (!token || token[0] == '\0'))
>
> libsvn_ra_serf\locks.c, line 329(1.6.x branch), function set_lock_headers():
> if (lock_ctx->force == TRUE)
>

I would find it very counter-intuitive to change these to:
  if (lock_ctx->force != FALSE) ...
... and to ensure that people are going to remember a rule like this in
the future.

On 04/16/2009 09:38 PM, C. Michael Pilato wrote:
>
> While I generally agree that for all intents and purposes, false == 0 and
> true is anything else, we do provide the values TRUE and FALSE for use with
> svn_boolean_t and it is not technically a contract violation to expect
> exactly one of those two values to be provided by the caller.
>
Agreed.

Lieven

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1753804
Received on 2009-04-16 21:49:01 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.