https://git.reactos.org/?p=reactos.git;a=commitdiff;h=450425028cd82948dce67977416aef69ba5a1411

commit 450425028cd82948dce67977416aef69ba5a1411
Author:     Serge Gautherie <[email protected]>
AuthorDate: Thu Jun 4 22:26:28 2020 +0200
Commit:     GitHub <[email protected]>
CommitDate: Thu Jun 4 23:26:28 2020 +0300

    [IPHLPAPI] getNumInterfacesInt(): Remove 'if()' redundant condition (#2884)
    
    No impact.
    
    Detected by Cppcheck: redundantCondition.
    Addendum to 1fe3a2d6c307a1ec11d7728a9493360a5808e1ac (r9788).
---
 dll/win32/iphlpapi/ifenum_reactos.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dll/win32/iphlpapi/ifenum_reactos.c 
b/dll/win32/iphlpapi/ifenum_reactos.c
index 41958ea1361..77fe4cf73d3 100644
--- a/dll/win32/iphlpapi/ifenum_reactos.c
+++ b/dll/win32/iphlpapi/ifenum_reactos.c
@@ -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++;
     }
 

Reply via email to