Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TCP_PORT_RETRY_CNT 5
- cpr_socket_t
- cprSecSocConnect (char *host,
- int port,
- int ipMode,
- boolean mode,
- uint32_t tos,
- uint16_t *localPort)
- {
- ....
- uint16_t loopCnt = 0;
- ....
- while (loopCnt < TCP_PORT_RETRY_CNT) {
- ....
- .... // loopCnt not changed
- ....
- }
- ....
- }
- This suspicious code was found in WebRTC project by PVS-Studio static code analyzer.
- Warning message is:
- V654 The condition 'loopCnt < 5' of loop is always true. cpr_win_socket.c 746
- 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
Advertisement