[setup] branch master, updated. release_2.873-4-g8c34cc9
corinna@sourceware.org
corinna@sourceware.org
Thu Jan 7 21:28:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=8c34cc982b182a7e1d808668dfb572d7e3332170
commit 8c34cc982b182a7e1d808668dfb572d7e3332170
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Jan 7 22:28:03 2016 +0100
Fix logical expressions checking if buttons are checked
* AntiVirus.cc (AntiVirusPage::OnActivate): Fix logical expressions
checking if a button is checked.
* net.cc (NetPage::OnInit): Ditto.
* source.cc (SourcePage::OnActivate): Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
AntiVirus.cc | 14 +++++---------
net.cc | 11 ++++-------
source.cc | 15 ++++++---------
3 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/AntiVirus.cc b/AntiVirus.cc
index 7dd01c4..876eb02 100644
--- a/AntiVirus.cc
+++ b/AntiVirus.cc
@@ -85,15 +85,11 @@ AntiVirusPage::OnActivate ()
{
load_dialog (GetHWND ());
// Check to see if any radio buttons are selected. If not, select a default.
- if ((!SendMessage
- (GetDlgItem (IDC_DISABLE_AV), BM_GETCHECK, 0,
- 0) == BST_CHECKED)
- && (!SendMessage (GetDlgItem (IDC_LEAVE_AV), BM_GETCHECK, 0, 0)
- == BST_CHECKED))
- {
- SendMessage (GetDlgItem (IDC_LEAVE_AV), BM_SETCHECK,
- BST_CHECKED, 0);
- }
+ if (SendMessage (GetDlgItem (IDC_DISABLE_AV), BM_GETCHECK, 0, 0)
+ != BST_CHECKED
+ && SendMessage (GetDlgItem (IDC_LEAVE_AV), BM_GETCHECK, 0, 0)
+ != BST_CHECKED)
+ SendMessage (GetDlgItem (IDC_LEAVE_AV), BM_SETCHECK, BST_CHECKED, 0);
}
bool
diff --git a/net.cc b/net.cc
index 1402c67..aa734da 100644
--- a/net.cc
+++ b/net.cc
@@ -135,13 +135,10 @@ NetPage::OnInit ()
CheckIfEnableNext();
// Check to see if any radio buttons are selected. If not, select a default.
- if ((!SendMessage (GetDlgItem (IDC_NET_IE5), BM_GETCHECK, 0, 0) ==
- BST_CHECKED)
- && (!SendMessage (GetDlgItem (IDC_NET_PROXY), BM_GETCHECK, 0, 0)
- == BST_CHECKED))
- {
- SendMessage (GetDlgItem (IDC_NET_DIRECT), BM_CLICK, 0, 0);
- }
+ if (SendMessage (GetDlgItem (IDC_NET_IE5), BM_GETCHECK, 0, 0) != BST_CHECKED
+ && SendMessage (GetDlgItem (IDC_NET_PROXY), BM_GETCHECK, 0, 0)
+ != BST_CHECKED)
+ SendMessage (GetDlgItem (IDC_NET_DIRECT), BM_CLICK, 0, 0);
}
long
diff --git a/source.cc b/source.cc
index 70751d2..90c98b5 100644
--- a/source.cc
+++ b/source.cc
@@ -103,15 +103,12 @@ SourcePage::OnActivate ()
load_dialog (GetHWND ());
// Check to see if any radio buttons are selected. If not, select a default.
- if ((!SendMessage
- (GetDlgItem (IDC_SOURCE_DOWNLOAD), BM_GETCHECK, 0,
- 0) == BST_CHECKED)
- && (!SendMessage (GetDlgItem (IDC_SOURCE_LOCALDIR), BM_GETCHECK, 0, 0)
- == BST_CHECKED))
- {
- SendMessage (GetDlgItem (IDC_SOURCE_NETINST), BM_SETCHECK,
- BST_CHECKED, 0);
- }
+ if (SendMessage (GetDlgItem (IDC_SOURCE_DOWNLOAD), BM_GETCHECK, 0, 0)
+ != BST_CHECKED
+ && SendMessage (GetDlgItem (IDC_SOURCE_LOCALDIR), BM_GETCHECK, 0, 0)
+ != BST_CHECKED)
+ SendMessage (GetDlgItem (IDC_SOURCE_NETINST), BM_SETCHECK,
+ BST_CHECKED, 0);
}
long
More information about the Cygwin-apps-cvs
mailing list