Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Deletes all previous field specifiers.
- * This should be used when dealing
- * with clients that send multiple NEP_PACKET_SPEC messages,
- * so only the last PacketSpec is taken into account. */
- int NEPContext::resetClientFieldSpecs(){
- this->fspecs.empty();
- return OP_SUCCESS;
- } /* End of resetClientFieldSpecs() */
- What a nice comment. It's a pity that the code does quite a different thing.
- This is what should have been written here: this->fspecs.clear();
- This suspicious code was found in Nmap project by PVS-Studio static code analyzer.
- Warning message is:
- V530 The return value of function 'empty' is required to be utilized. nping nepcontext.cc 562
- 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