[libc] Fix wrong name in Compare.h (#117223)

Fix for some mistakes in source code found using PVS Studio.

Inspired by: https://pvs-studio.com/en/blog/posts/cpp/1188/

Fixed:
- [Bug 5](https://pvs-studio.com/en/blog/posts/cpp/1188/#IDF23EA2CEAB)
This commit is contained in:
Chuvak 2024-11-22 02:29:08 +03:00 committed by GitHub
parent 385961d7b2
commit 3709c2d15a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ ValuesEqual(T x1, T x2) {
LIBC_NAMESPACE::fputil::FPBits<T> bits2(x2);
// If either is NaN, we want both to be NaN.
if (bits1.is_nan() || bits2.is_nan())
return bits2.is_nan() && bits2.is_nan();
return bits1.is_nan() && bits2.is_nan();
// For all other values, we want the values to be bitwise equal.
return bits1.uintval() == bits2.uintval();