From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89305 invoked by alias); 7 Jan 2016 21:28:08 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 89261 invoked by uid 9078); 7 Jan 2016 21:28:08 -0000 Date: Thu, 07 Jan 2016 21:28:00 -0000 Message-ID: <20160107212808.89233.qmail@sourceware.org> From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup] branch master, updated. release_2.873-4-g8c34cc9 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a9a8e93a21763260eeb0b14b0747af86c9056cc2 X-Git-Newrev: 8c34cc982b182a7e1d808668dfb572d7e3332170 X-SW-Source: 2016-q1/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=8c34cc982b182a7e1d808668dfb572d7e3332170 commit 8c34cc982b182a7e1d808668dfb572d7e3332170 Author: Corinna Vinschen 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 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