Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static UINT_PTR m_socketHandle ;
- void TTrace::LoopMessages(void)
- {
- ...
- // Socket creation
- if ( (m_socketHandle = socket(AF_INET,SOCK_STREAM,0)) < 0)
- {
- continue;
- }
- ...
- }
- This suspicious code was found in tracetool project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression '(m_socketHandle = socket (2, 1, 0)) < 0' is always false. Unsigned type value is never < 0. Vs8_Win_Lib tracetool.cpp 871
- 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