Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int compare_procids(const void *p1, const void *p2)
- {
- const struct server_id *i1 = (struct server_id *)p1;
- const struct server_id *i2 = (struct server_id *)p2;
- if (i1->pid < i2->pid) return -1;
- if (i2->pid > i2->pid) return 1;
- return 0;
- }
- This suspicious code was found in samba project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions to the left and to the right of the '>' operator: i2->pid > i2->pid brlock.c 1901
- 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