From 2295e87be87752234dbce04a97e433bfc64eae43 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sat, 2 Feb 2002 18:06:03 +0000 Subject: [PATCH] Fixed some more missing parenthesis issues. --- dlls/comctl32/comctl32undoc.c | 6 +++--- dlls/comctl32/header.c | 2 +- dlls/comctl32/rebar.c | 2 +- dlls/commdlg/fontdlg.c | 12 ++++++------ dlls/shell32/iconcache.c | 2 +- dlls/user/dde/client.c | 2 +- tools/winedump/msmangle.c | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c index e9a8453e376..b93d3d1bb78 100644 --- a/dlls/comctl32/comctl32undoc.c +++ b/dlls/comctl32/comctl32undoc.c @@ -51,7 +51,7 @@ typedef struct _LOADDATA PVOID ptr; } LOADDATA, *LPLOADDATA; -typedef HRESULT CALLBACK (*DPALOADPROC)(LPLOADDATA,IStream*,LPARAM); +typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM); INT __cdecl _wtoi(LPWSTR string); @@ -264,7 +264,7 @@ DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags, } else if (nResult < 0) { - if (!dwFlags & 8) + if (!(dwFlags & 8)) { PVOID ptr; @@ -277,7 +277,7 @@ DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags, } else { - if (!dwFlags & 4) + if (!(dwFlags & 4)) { PVOID ptr; diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 744154364b2..d4cdda2a908 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -883,7 +883,7 @@ HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) if (lpItem->fmt == 0) lpItem->fmt = HDF_LEFT; - if (!(lpItem->fmt &HDF_STRING) && (phdi->mask & HDI_TEXT)) + if (!(lpItem->fmt & HDF_STRING) && (phdi->mask & HDI_TEXT)) { lpItem->fmt |= HDF_STRING; } diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 309f3eae53c..63749b6763e 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -1727,7 +1727,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient) iband = infoPtr->rows[i-1].istartband; lpBand = &infoPtr->bands[iband]; if(HIDDENBAND(lpBand)) continue; - if (!lpBand->fMask & RBBS_VARIABLEHEIGHT) continue; + if (!(lpBand->fMask & RBBS_VARIABLEHEIGHT)) continue; if (((INT)lpBand->cyMaxChild < 1) || ((INT)lpBand->cyIntegral < 1)) { if (lpBand->cyMaxChild + lpBand->cyIntegral == 0) continue; diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index 28107cbdcd8..13579e93022 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -636,9 +636,9 @@ static INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType, if (!SendMessageA(hcmb2, CB_GETCOUNT, 0, 0)) { - HDC hdc= (lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); + HDC hdc= ((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); i=SetFontStylesToCombo2(hcmb2,hdc,lplf); - if (!(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC)) + if (!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC)) ReleaseDC(hDlg,hdc); if (i) return 0; @@ -733,7 +733,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, ShowWindow(GetDlgItem(hDlg,grp1),SW_HIDE); ShowWindow(GetDlgItem(hDlg,stc4),SW_HIDE); } - hdc= (lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); + hdc= ((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); if (hdc) { CFn_ENUMSTRUCT s; @@ -811,7 +811,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, return FALSE; } - if (!(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC)) + if (!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC)) ReleaseDC(hDlg,hdc); SetCursor(hcursor); return TRUE; @@ -968,7 +968,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, { case cmb1:if (HIWORD(wParam)==CBN_SELCHANGE) { - hdc=(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); + hdc=((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg); if (hdc) { SendDlgItemMessageA(hDlg, cmb2, CB_RESETCONTENT16, 0, 0); @@ -990,7 +990,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, SendDlgItemMessageA(hDlg,cmb3, CB_SETCURSEL, 0, 0); SetCursor(hcursor); } - if (!(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC)) + if (!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC)) ReleaseDC(hDlg,hdc); } else diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index cf3df2f489c..ac70554f747 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -405,7 +405,7 @@ HICON WINAPI ExtractIconExA ( LPCSTR lpszFile, INT nIconIndex, HICON * phiconLar } /* if no pointers given and one icon expected, return the handle directly*/ - if (!phiconLarge && ! phiconSmall && nIcons==1 ) + if (!phiconLarge && !phiconSmall && nIcons==1 ) phiconSmall = &ret; if (phiconSmall) diff --git a/dlls/user/dde/client.c b/dlls/user/dde/client.c index 2bf99a55d1a..ee0a63d5d7b 100644 --- a/dlls/user/dde/client.c +++ b/dlls/user/dde/client.c @@ -1225,7 +1225,7 @@ BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction { for (pConv = pInstance->convs[WDML_CLIENT_SIDE]; pConv; pConv = pConv->next) { - if (!pConv->wStatus & ST_CONNECTED) continue; + if (!(pConv->wStatus & ST_CONNECTED)) continue; for (pXAct = pConv->transactions; pXAct; pXAct = pXAct->next) { if (pXAct->dwTimeout == TIMEOUT_ASYNC) diff --git a/tools/winedump/msmangle.c b/tools/winedump/msmangle.c index adee2ac69ab..109f9a48d36 100644 --- a/tools/winedump/msmangle.c +++ b/tools/winedump/msmangle.c @@ -453,7 +453,7 @@ static char *demangle_datatype (char **str, compound_type *ct, fatal ("Out of Memory"); /* If we're a reference, re-use the pointer already in the type */ - if (!ct->flags & CT_BY_REFERENCE) + if (!(ct->flags & CT_BY_REFERENCE)) stripped[ strlen (stripped) - 2] = '\0'; /* otherwise, strip it */ ct->expression = str_create (2, ct->flags & CT_CONST ? "const " :