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

Suspicious chain of checks

From: Dmitry <wipedout_at_yandex.ru>
Date: Wed, 07 Sep 2011 18:48:43 +0400

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?

Thank you.
Dmitry.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2836201

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-09-07 16:48:49 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.