Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef UINT_PTR SOCKET;
- #define ADNS_SOCKET SOCKET
- struct adns__state {
- ....
- ADNS_SOCKET udpsocket, tcpsocket;
- ....
- };
- static int init_finish(adns_state ads) {
- ....
- if (ads->udpsocket<0) { r= errno; goto x_free; }
- ....
- }
- This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'ads->udpsocket < 0' is always false. Unsigned type value is never < 0. setup.c 539
- 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