- Fix typos, found by PVS-Studio
authorDmitry Chapyshev <dmitry@reactos.org>
Thu, 1 Sep 2011 13:18:22 +0000 (13:18 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Thu, 1 Sep 2011 13:18:22 +0000 (13:18 +0000)
svn path=/trunk/; revision=53516

reactos/dll/win32/netshell/lanstatusui.c
reactos/dll/win32/opengl32/font.c
reactos/dll/win32/shell32/autocomplete.c
reactos/dll/win32/syssetup/wizard.c
reactos/drivers/network/tdi/cte/events.c
reactos/lib/3rdparty/adns/src/transmit.c
reactos/lib/3rdparty/stlport/src/locale.cpp
reactos/ntoskrnl/mm/ARM3/mdlsup.c

index 2a5dd9b..75123d7 100644 (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)
         {
index ea58b75..4f67b57 100644 (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*/
index a0ace20..b05fd67 100644 (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);
index 809da5f..cae440d 100644 (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");
             }
index 26bf227..a3a3053 100644 (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;
index 421a85d..352b7f6 100644 (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;
index 8df976b..774f843 100644 (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;
index a5fdd59..e7e613d 100644 (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;