Skip to content

Commit 3709c2d

Browse files
authored
[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)
1 parent 385961d commit 3709c2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/fuzzing/math/Compare.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ValuesEqual(T x1, T x2) {
2020
LIBC_NAMESPACE::fputil::FPBits<T> bits2(x2);
2121
// If either is NaN, we want both to be NaN.
2222
if (bits1.is_nan() || bits2.is_nan())
23-
return bits2.is_nan() && bits2.is_nan();
23+
return bits1.is_nan() && bits2.is_nan();
2424

2525
// For all other values, we want the values to be bitwise equal.
2626
return bits1.uintval() == bits2.uintval();

0 commit comments

Comments
 (0)