[WIN32K:NTUSER] NC_IconForWindow(): Remove redundant if() (#2842)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Tue, 26 May 2020 18:25:39 +0000 (20:25 +0200)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 18:25:39 +0000 (20:25 +0200)
No impact.

Detected by Cppcheck: identicalInnerCondition.
Addendum to 98060c28c8b051bc4cfd460bd008a2eff125658e (r60622).

win32ss/user/ntuser/nonclient.c

index 0c7dac8..59bd57e 100644 (file)
@@ -696,7 +696,7 @@ PCURICON_OBJECT FASTCALL NC_IconForWindow( PWND pWnd )
    // it does not use the default icon! And it does not check for DS_MODALFRAME.
    if (!hIcon && !(pWnd->ExStyle & WS_EX_DLGMODALFRAME))
    {
-      if (!hIcon) hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
+      hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
       if (!hIcon) hIcon = gpsi->hIconWindows;   // Reg size.
    }
    if (hIcon)