Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CatalystDriver::isDeviceSupported(
- SNMP_Transport *snmp, const TCHAR *oid)
- {
- DWORD value = 0;
- if (SnmpGet(snmp->getSnmpVersion(), snmp,
- _T(".1.3.6.1.4.1.9.5.1.2.14.0"),
- NULL, 0, &value, sizeof(DWORD), 0)
- != SNMP_ERR_SUCCESS)
- return false;
- // Catalyst 3550 can return 0 as number of slots
- return value >= 0;
- }
- This suspicious code was found in NetXMS project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'value >= 0' is always true. Unsigned type value is always >= 0. catalyst.cpp 71
- 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