PVS-StudioWarnings

PVS-Studio warning V523 for DDKSamples

Nov 26th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.05 KB | None | 0 0
  1. NDIS_STATUS
  2. Hw11QueryDiversitySelectionRX(
  3.   _In_  PHW_MAC_CONTEXT HwMac,
  4.   _In_  BOOLEAN         SelectedPhy,
  5.   _In_  ULONG           MaxEntries,
  6.   _Out_ PDOT11_DIVERSITY_SELECTION_RX_LIST
  7.                         Dot11DiversitySelectionRXList
  8.     )
  9. {
  10.   //
  11.   // Determine the PHY that the user wants to query
  12.   //
  13.   if (SelectedPhy)
  14.     return HwQueryDiversitySelectionRX(HwMac->Hw,
  15.               HwMac->SelectedPhyId,
  16.               MaxEntries,
  17.               Dot11DiversitySelectionRXList
  18.               );
  19.   else
  20.     return HwQueryDiversitySelectionRX(HwMac->Hw,
  21.               HwMac->SelectedPhyId,
  22.               MaxEntries,
  23.               Dot11DiversitySelectionRXList
  24.               );
  25. }
  26.  
  27. This suspicious code was found in DDKSamples project by PVS-Studio static code analyzer.
  28. Warning message is:
  29. V523 The 'then' statement is equivalent to the 'else' statement. hw_oids.c 1043
  30.  
  31. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment