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

Re: Suspicious chain of checks

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 08 Sep 2011 20:03:12 +0200

On 07.09.2011 16:48, Dmitry wrote:
> Hey.
>
> Currently CCopyDlg::OnCheck() reads:
>
> bool check = false;
> if (hwnd == GetDlgItem(IDC_CHECKALL)->GetSafeHwnd())
> check = true;
> else if (hwnd == GetDlgItem(IDC_CHECKNONE)->GetSafeHwnd())
> check = false;
>
> Here if the first condition holds true "check" is asssigned true. Otherwise the second condition is checked and if that holds true "check" is assigned the initial value. The code has the following effect:
>
> bool check = false;
> if (hwnd == GetDlgItem(IDC_CHECKALL)->GetSafeHwnd())
> check = true;
>
> Was anything else meant in that code?

Fixed in r21953.

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=2836513
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-09-08 20:03:21 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.