Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void sip_threadinfo_destructor(void *obj)
- {
- struct sip_threadinfo *th = obj;
- struct tcptls_packet *packet;
- if (th->alert_pipe[1] > -1) { //<==
- close(th->alert_pipe[0]);
- }
- if (th->alert_pipe[1] > -1) {
- close(th->alert_pipe[1]);
- }
- th->alert_pipe[0] = th->alert_pipe[1] = -1;
- ....
- }
- This suspicious code was found in Asterisk project by PVS-Studio static code analyzer.
- Warning message is:
- V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 2513, 2516. chan_sip.c 2516
- 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