- Fix typos, found by PVS-Studio

svn path=/trunk/; revision=53516
This commit is contained in:
Dmitry Chapyshev 2011-09-01 13:18:22 +00:00
parent 2504a4e518
commit c10f3c3b14
8 changed files with 10 additions and 10 deletions

View file

@ -179,7 +179,7 @@ UpdateLanStatus(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
pContext->Status = 3;
}
}
else if (IfEntry.dwOperStatus == MIB_IF_OPER_STATUS_UNREACHABLE || MIB_IF_OPER_STATUS_DISCONNECTED)
else if (IfEntry.dwOperStatus == MIB_IF_OPER_STATUS_UNREACHABLE | MIB_IF_OPER_STATUS_DISCONNECTED)
{
if (pContext->Status != 4)
{

View file

@ -1081,7 +1081,7 @@ BOOL APIENTRY IntUseFontOutlinesW(HDC hDC, DWORD first, DWORD count, DWORD listB
glyphSize = GetGlyphOutline(hDC, glyphIndex, GGO_NATIVE, &glyphMetrics, 0, NULL, &matrix);
if (glyphSize < 0)
if (glyphSize == GDI_ERROR)
return FALSE; /*WGL_STATUS_FAILURE*/
if (glyphSize > glyphBufSize)
@ -1096,7 +1096,7 @@ BOOL APIENTRY IntUseFontOutlinesW(HDC hDC, DWORD first, DWORD count, DWORD listB
/*
* Get the glyph's outlines.
*/
if (GetGlyphOutline(hDC, glyphIndex, GGO_NATIVE, &glyphMetrics, glyphBufSize, glyphBuf, &matrix) < 0)
if (GetGlyphOutline(hDC, glyphIndex, GGO_NATIVE, &glyphMetrics, glyphBufSize, glyphBuf, &matrix) == GDI_ERROR)
{
HeapFree(GetProcessHeap(), 0, glyphBuf);
return FALSE; /*WGL_STATUS_FAILURE*/

View file

@ -448,7 +448,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
ShowWindow(This->hwndListBox, SW_HIDE);
break;
case WM_KILLFOCUS:
if ((This->options && ACO_AUTOSUGGEST) &&
if ((This->options & ACO_AUTOSUGGEST) &&
((HWND)wParam != This->hwndListBox))
{
ShowWindow(This->hwndListBox, SW_HIDE);

View file

@ -1693,8 +1693,8 @@ RegistrationProc(LPVOID Parameter)
{
if (0 == LoadStringW(hDllInstance, IDS_UNKNOWN_ERROR,
UnknownError,
sizeof(UnknownError) / sizeof(UnknownError[0] -
20)))
sizeof(UnknownError) / sizeof(UnknownError[0]) -
20))
{
wcscpy(UnknownError, L"Unknown error");
}

View file

@ -123,7 +123,7 @@ CTEScheduleEvent(PCTE_DELAYED_EVENT Event,
KeAcquireSpinLock(&Event->Lock, &OldIrql);
/* Make sure it is queued */
if (!Event->Queued);
if (!Event->Queued)
{
/* Mark it as queued and set optional context pointer */
Event->Queued = TRUE;

View file

@ -200,7 +200,7 @@ void adns__querysend_tcp(adns_query qu, struct timeval now) {
ADNS_CAPTURE_ERRNO;
adns__sigpipe_unprotect(qu->ads);
if (wr < 0) {
if (!(errno == EAGAIN || EWOULDBLOCK || errno == EINTR || errno == ENOSPC ||
if (!(errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ENOSPC ||
errno == ENOBUFS || errno == ENOMEM)) {
adns__tcp_broken(ads,"write",strerror(errno));
return;

View file

@ -208,7 +208,7 @@ static void _Stl_loc_combine_names_aux(_Locale_impl* L,
static void _Stl_loc_combine_names(_Locale_impl* L,
const char* name1, const char* name2,
locale::category c) {
if ((c & locale::all) == 0 || strcmp(name1, name1) == 0)
if ((c & locale::all) == 0 || strcmp(name1, name2) == 0)
L->name = name1;
else if ((c & locale::all) == locale::all)
L->name = name2;

View file

@ -1174,7 +1174,7 @@ MmUnlockPages(IN PMDL Mdl)
// Check if this page is in the PFN database
//
Pfn1 = MiGetPfnEntry(*MdlPages);
if (Pfn1);
if (Pfn1)
{
/* Get the current entry and reference count */
OldRefCount = Pfn1->u3.e2.ReferenceCount;