Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool PasswordFormComparator(const PasswordForm& pf1,
- const PasswordForm& pf2) {
- if (pf1.submit_element < pf2.submit_element)
- return true;
- if (pf1.username_element < pf2.username_element)
- return true;
- if (pf1.username_value < pf2.username_value)
- return true;
- if (pf1.username_value < pf2.username_value)
- return true;
- if (pf1.password_element < pf2.password_element)
- return true;
- if (pf1.password_value < pf2.password_value)
- return true;
- return false;
- }
- This suspicious code was found in Chromium 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: 259, 261. profile_sync_service_password_unittest.cc 261
- 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