Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sipMethod_t
- sippmh_get_method_code (const char *method)
- {
- ....
- else if (strcmp(method, SIP_METHOD_INFO) == 0) <<<<====
- ret = sipMethodInfo;
- else if (strcmp(method, SIP_METHOD_PUBLISH) == 0)
- ret = sipMethodPublish;
- else if (strcmp(method, SIP_METHOD_MESSAGE) == 0)
- ret = sipMethodMessage;
- else if (strcmp(method, SIP_METHOD_INFO) == 0) <<<<====
- ret = sipMethodInfo;
- ....
- }
- This suspicious code was found in WebRTC project by PVS-Studio static code analyzer.
- Warning message is:
- V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 196, 202. ccsip_pmh.c 196
- 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