[CSRSRV] CsrApiHandleConnectionRequest(): Remove ASSERT() redundant condition (#2858)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Thu, 4 Mar 2021 21:54:00 +0000 (22:54 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Mar 2021 21:54:00 +0000 (22:54 +0100)
Detected by Cppcheck: redundantCondition.
Addendum to 835f3ef1.

subsystems/win32/csrsrv/api.c

index a0b3de1..6ff8694 100644 (file)
@@ -189,7 +189,7 @@ CsrApiHandleConnectionRequest(IN PCSR_API_MESSAGE ApiMessage)
     ConnectInfo->ServerProcessId = NtCurrentTeb()->ClientId.UniqueProcess;
 
     /* Accept the Connection */
-    ASSERT(!AllowConnection || (AllowConnection && CsrProcess));
+    ASSERT(!AllowConnection || CsrProcess);
     Status = NtAcceptConnectPort(&ServerPort,
                                  AllowConnection ? UlongToPtr(CsrProcess->SequenceNumber) : 0,
                                  &ApiMessage->Header,