[IPHLPAPI] getNumInterfacesInt(): Remove 'if()' redundant condition (#2884)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Thu, 4 Jun 2020 20:26:28 +0000 (22:26 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 20:26:28 +0000 (23:26 +0300)
No impact.

Detected by Cppcheck: redundantCondition.
Addendum to 1fe3a2d6c307a1ec11d7728a9493360a5808e1ac (r9788).

dll/win32/iphlpapi/ifenum_reactos.c

index 41958ea..77fe4cf 100644 (file)
@@ -246,8 +246,7 @@ static DWORD getNumInterfacesInt(BOOL onlyNonLoopback)
 
     for( i = 0; i < numEntities; i++ ) {
         if( isInterface( &entitySet[i] ) &&
-            (!onlyNonLoopback ||
-             (onlyNonLoopback && !isLoopback( tcpFile, &entitySet[i] ))) )
+            (!onlyNonLoopback || !isLoopback( tcpFile, &entitySet[i] )) )
             numInterfaces++;
     }