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

Re: Suspicious error handling code

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 28 Jul 2011 20:55:18 +0200

On 28.07.2011 16:35, Dmitry wrote:
> Hey.
>
> Currently SubWCRev::GetWCInfo() reads:
>
> if (wcPath==NULL)
> return ERROR_INVALID_PARAMETER;
>
> The problem is ERROR_INVALID_PARAMETER is defined as numeric constant 77 in WinAPI headers, so SUCCEEDED will evaluate to "true" on this value and any well-obeying caller will think the output parameters have been set. I suspect it should be E_INVALIDARG instead.

Good catch!
Fixed in r21736.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2805400
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-28 20:55:36 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.